title: Calling a get method in another class without creating an object in Java
body: <p>Hi I am a beginner in Java programming. As the title says, I am trying to call a get method in another class without creating an object. The get method can not be static as I am accessing private in field in a given class. I know that I can access a regular method without creating the object if the method is static, but I cant do this with a simple get method. I know that this is not possible, but are there alternatives or some other way to get around this? I have three classes. One super class and the other two extends this class. I have a List in one of the subclasses and I am trying to access the get method of that list in the other subclass (not sure if this is relevant). The list is instantiated in the constructor of the given class. I dont really have any code besides the get methods so there is not much to show in code really. Thanks. </p>
  
  <p>EDIT:</p>
  
  <pre><code>public class A{}
  
  public class B{ 
  private List&lt;A&gt; list; 
  private B() {
      list = new ArrayList&lt;&gt;();
  }
  public int getList() {
      return list;
  }
  }
  
  public class C{
  I want to access getList method here. 
  }
  </code></pre>