I am still learning but seem to fall at what should be very simple hurdles; my strong points seem to be with the logic of equations but I possess little skill at remembering and implementing functions and correct simple syntax's.
The class that I am implementing the method in is MyClass, the method that I want to define the variable taken from the other class is establishIrEvent. The class that I want to collect the variable from is IREvent, the getter method that returns the variable in this class that I want to collect is getX.
Now for the code:
Getter method from IREvent class:
public int getX() {
return x;
}
Method that I want to use that variable in to assign, (with my terribly poor attempt) in MyClass:
public void establishIrEvent(IREvent arg0) {
int source = (IREvent)arg0.getX();
}
Any advice will be hugely appreciated and fingers crossed this question may aid someone else in a similar pickle! Please ask for any more info as I always seem to miss something or ask a question that annoys an experienced developer somewhat.