Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

bean naming conventions -> getter/setter

$
0
0

When I have a field called e.g. xCoordinate it appears to me that the getter shoud be named getXCoordinate().

 

Why? Because "get" is clearly a name standard in Java, then "X" and "Coordinate" are distinguishable by the case shift (small x -> big C) so "X" is is clearly the start and end of a word at the same time and should be capitalized.

 

Now IntelliJ auto-creates a getter called "getxCoordinate". Even though Eclipse does the same, it still appears to me that this is wrong since there is no more distinction between "get" "X" and "Coordinate" rather "getx" forms a non-existing term. Why is this so?


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>