C# has automatic properties which greatly simplify your code:
public string Name { get; set; }
public string MiddleName { get; set; }
public string LastName { get; set; }
Whereas Java has you write this much code:
private String name;
private String middleName;
private String LastName;
public String Name(){
return this.name;
}
etc..
Is there a particular reason Java hasn't implemented something like this?
Yep, because it doesn't have it. As the saying goes, all features start out unimplemented.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With