Variable name for getters

It’s NOT the name of the member variable that counts, it’s the name of the get method.

You use the part after “get” as the property name.

Normally you would convert the first letter after “get” to lowercase, but if the second letter is uppercase also, then you don’t.

getXYAxis – the variable name should be “XYAxis”

getName – the variable name should be “name”

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.