Person p = new Person("ynw520"){};
这个语句是否正确?
class Demo{
private String name="liaolj";
public Demo(String name){
this.name = name;
}
public static void main(String[] args) {
class T{
{
System.out.println("ynw520");
}
}
new T();
}
}
上面的代码是否正确?
这个语句是否正确?
class Demo{
private String name="liaolj";
public Demo(String name){
this.name = name;
}
public static void main(String[] args) {
class T{
{
System.out.println("ynw520");
}
}
new T();
}
}
上面的代码是否正确?