first of all I apologize if my question is difficult to understand. I'm having a hard time trying to explain exactly what I need help with. I am new to Java and the concept of passing by reference etc.
Basically, I need to know why the below code is incorrect. How do I tell Java to use a method for an object passed in as a parameter of the constructor? Apologies again, and thanks for reading!
public ClassOne(ClassTwo twoObject){
}
public boolean OneMethod(){
twoObject.MethodName(); // twoObject cannot be resolved.
}