i want to help me with this.I should create a method equals that will check two objects.If the objects are equal then it will return true,if not it will return false. For me i have worked on this but with a different way i did a method in past with like that way
public static boolean trueorfalse(int cars,int bikes){
boolean y;
if(get.car==get.bikes)
{
System.out.println("are equal");
y=true;
}
else
{
System.err.println("arent equal");
y=false;
}
return y;
}
Now with the method equal :
public static boolean equal(int cars,int bikes){ //i change the name?
if(get.car==get.bikes) // may needs here equalsof() something like this? or is completely wrong i am.
{
System.out.println("are equal");
y=true;
}
else
{
System.err.println("arent equal");
y=false;
}
return y;
}
if you could help me out with this i would be greatful because i think i have solve it but i am not sure.Thanks,i want to refer that it is my first visit here i dont know about if because is "begginer" level you not help.