请教各位大神,一下对象怎解
class Demo45 {
String name;
int age;
public void tell() {
System.out.println("姓名"+name+"年龄"+age);
}
}
public class leigon{
public static void main(String[] args) {
}
Demo45 pre=new Demo45();
}
class Demo45 {
String name;
int age;
public void tell() {
System.out.println("姓名"+name+"年龄"+age);
}
}
public class leigon{
public static void main(String[] args) {
}
Demo45 pre=new Demo45();
}
2015-12-02
举报