很简单的一个实例,怎么就出错了?
class poper{
String name;
int age;
void tell()
{
System.out.print("名字:" + name + "年龄" + age);
}
}
public class master
{
public static void main(String args[])
{
poper p1 = new poper();
p1.name = "啊啊啊";
p1.age = 17;
p1.tell();
}
}