Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAlan Kuo
7,697 PointsWhy is the story method must be capitalized?
So I'm making this project and as I go on I find that the story method must be capitalized. I don't know why cuz we should be able to name method the way we want to.
1 Answer
Maciej Czuchnowski
36,441 PointsI assume you are referring to a Story()
constructor. Constructor needs to have the same name as the class, so it is capitalized. Otherwise, it will not work. https://www.dummies.com/programming/java/how-to-use-a-constructor-in-java/
Let me know if this is what you were referring to.
Alan Kuo
7,697 PointsAlan Kuo
7,697 PointsThank you the answer is clear and I just forgot the principle.