class Student
{
int age;
public static void main(String[] args)
{
Student p=new Student();
Student q=new Student();
p.age=13;
q.age=13;
if(p.equals(q))
System.out.println("p 与 q 相等");
else
System.out.println("p 与 q 不等");
}
}
{
int age;
public static void main(String[] args)
{
Student p=new Student();
Student q=new Student();
p.age=13;
q.age=13;
if(p.equals(q))
System.out.println("p 与 q 相等");
else
System.out.println("p 与 q 不等");
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货