Android Build an Interactive Story App The Model-View-Presenter Pattern Creating the Story

Alan Kuo
Alan Kuo
7,697 Points

Why 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
Maciej Czuchnowski
36,426 Points

I 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
Alan Kuo
7,697 Points

Thank you the answer is clear and I just forgot the principle.