title: User defined data types in Java?
body: <p>Recently I attended an interview, where I was asked, </p>
  
  <blockquote>
    <p><em>What are user-defined data types in Java?</em></p>
  </blockquote>
  
  <p>I answered that variables declared using class type are user-defined. But I am not convinced with my answer. I feel class type is <em>Reference data type/Object data type</em>.</p>
  
  <p>As per there are two types:</p>
  
  <ol>
  <li>Primitive data types [int,float..etc].</li>
  <li>Reference type/Object type[String str, user_defined_Class Obj1..etc]</li>
  </ol>
  
  <p>I did search on this, but couldn't get a proper answer.</p>
  
  <p>Kindly shed some light on this.</p>