title: Java - Should private instance variables be accessed in constructors through getters and setters method?
body: <p>I know that private instance variables are accessed through their public getters and setters method.</p>
  
  <p>But when I generate constructors with the help of IDE, it initializes instance variables directly instead of initializing them through their setter methods.</p>
  
  <p>Q1. So should I change the IDE generated code for constructors to initialize those instance variables through their setter methods.</p>
  
  <p>Q2. If yes, then why IDE don't generate constructors code in that way?</p>
  
  <p>============================= EDITED =======================================</p>
  
  <ul>
  <li><p>I use Eclipse and Netbeans IDE</p></li>
  <li><p>It's a general question. But as asked by @Lords would the answer depends on whether our constructor is public or protected or package private or private?</p></li>
  </ul>