I'm trying to figure out what the syntax is for calling an object inside a method..
Pseudocode:
boolean check(Object someObject) {
return someObject == theOtherObject;
}
public static void main(String args[]) {
someClass one = new someClass();
someClass two = new someClass();
one.check(two);
}
So the check
method is supposed to check whether the two objects are equal, but how would I specify the other object (theOtherObject
should be one
)?
Thanks in advance!