[求助]这个程序不知道为什么编译通不过?
程序如下(编译时报错说:illegal character):class Person
{
private String name;
private int age;
public Person(String name,int age)
{
this.name=name;
this.age=age;
}
public Person compare(Person p)
{
if(this.age>P.age)
return this;
else
return P;
}
}
public class app11
{
public static void main(String args[])
{
Person Per1=new Person("张三",20);
Person Per2=new Person("李四",21);
Person Per3;
Per3=Per1.compare(Per2);
if(Per3==Per1)
System.out.println("张三年龄大");
else
System.out.println("李四年龄大");
}
}