title: Java Base Class Reference Variable
body: <p><em>A base class reference variable may be assigned the address of either a base class object or a derived class object.</em></p>
  
  <p>True/False?</p>
  
  <p>Can anybody show me an example of what this means? I'm new to Java and am trying to understand language specific terms of Java. Thanks.</p>
  
  <p>I think an example of this would be the code I've written below:</p>
  
  <pre><code>public class B extends A {
      A a = new A();
      A ab = new B();
  }
  
  class A {
  
  }
  </code></pre>
  
  <p>I think that since both reference variables are valid syntax (in Eclipse) then the answer is true.</p>