title: An object has a copy of all the class members(except the static ones), so does an object has a copy of an inner class also?
body: <p>An object has a copy of all the class members(except the static ones), so does an object has a copy of an inner class also?</p>
  <p>Below is my code:</p>
  <pre><code>    package com.example;
  
          
      class outerClass{
          
           class innnerClass{
              
              }
      }
  
  
      public class A{
  
        public void main(String[] args){
          outerClass obj1 = new outerClass();
  
          outerClass.innerClass obj2 = obj1.new innerClass();
        }
      }
  </code></pre>
  <p>My doubt is that the obj2 is an instance of the &quot;innerClass which is a member of outerClass&quot; or an instance of the &quot;innerClass which is a member of obj1 object&quot; ?</p>