我对Java代码块感到困惑,我不知道它代表什么。
public class Person {
{ // Here that is this ? Is this static code, apparently it is not? is it anonymous static class ?
System.out.println(this.getClass());
System.out.println(getAge());
}
private String name;
private String age;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAge() {
return age;
}
public void setAge(String age) {
this.age = age;
}
}