Java Programming in 60 seconds. Getter and Setter methods. The Java equivalent of C# properties.
Many object oriented languages, such as C#, provide a simple way of defining getter and setter accessors to assign and retrieve the values of private fields in a class. These are usually called 'properties' and they may permit the programmer to use the same sort of assignment and retrieval syntax that is used with variables rather than with methods. Java doesn't have this capability. Instead, there is a convention of creating pairs of accessor methods whose names begin with get and set -- this 60 second Java programing video explains this.
For more hints and tips be sure to subscribe to the Bitwise Courses YouTube channel: / bitwisecourses
For in-depth programming tutorials, see the Bitwise Courses web site: http://www.bitwisecourses.com/
The music in this video was composed by Nic Croll. For more of Nic's music, visit: http://www.nicolascroll.com/