There are a few differences between the first and second, and a few things (and lack thereof) in both demonstrate bad practice (see Norm's post, and there are a few other things I'd considered bad practice). But focusing on your question at hand - standard practice is to follow the get/set methods of variable access. This is the standard of 'javabeans', some libraries depend upon method names designated as get/set, and more importantly its a standard that allows your code to be readable by others. Many IDE's allow you to automatically define the getter/setter methods for variables.