And you can replace it with a virtual property in the future (changing the underlying implementation) without breaking anything. And user code ends up simpler and more readable too:
foo.baz += foo.bar;
vs.
foo.setBaz( foo.getBaz() + foo.getBar() );
Re:Java 9 features announced
by HanyouHottie on Monday August 18, 2014 @04:57PM
(#8194634)
That example reminds me of this recent post on The Old New Thing: http://blogs.msdn.com/b/oldnewthing/archive/2014/08/14/10549...
Interesting behavior.
public int Age{get;set;}
no need to declare private variable, get or set methods.