In C#, I Can use a simple way like below
public class Dummy
{
public string Name { get; set; }
}
but if i use java to do the same thing, i must do like below
public class Dummy {
private String _name;
public void setName(String value) {
this._name = value;
}
public String getName() {
return this._name;
}
}
so, you can tell that is at least 7 line codes take the same efftects as 1 line code in c#; so, i'm wondering at is there a simple way in java that i can use to simple set field or get field?
thx for advanced