السلام عليكم ممكن تساعدوني تساعدوني في تصحيح هذا الكود هو لاستخدام الكائن كمتغير
class test {
int a,b;
test(int i, int i0) {
throw new UnsupportedOperationException("Not yet implemented");
}
boolean equal(test m){
if(m.a==a&&m.b==b)
return(true);
else
return(false);
}
}
class obj{
public static void main(String[] args){
test x=new test(3,5);
test y=new test(3,5);
test z=newt test(-1,5);
boolean w=x equal(y);
System.out.print(w);
}
}