I may use incorrect terms, sorry in advance. I need to access a property from instance of another class that is located in the the instance of outer class. There will be two instances of class Outer and I need to store and process property "desiredProperty" for each of them individually. Note: All classes are different. Inner1 and Inner2 are not the same classes! Here is a simple example.
File 1:
public class Outer{
public Inner1 inner1 = new Inner1();
public Inner2 inner2 = new Inner2();
}
File 2:
public class Inner1 {
int desiredProperty=1;
}
File 3:
public class Inner2{
public int getDesiredProperty(){
//How can I here access the property DesiredProperty from Inner1?
}
}