Java and C#-like properties

c#, java, properties

Solution

No

You don't have the concept of Properties in the Java language. You need to use getters and setters..

Problem

Does Java natively support properties, like C#? Or when coding in Java, when trying to encapsulate variables, you are constrained to do it by `getVariable()` and `setVariable()` kinda methods? Thanks

Original source