title: Private List with Getter/Setter vs Public List
body: <p>Would it be better to make a global List in a class private and have getter and setter methods or would it be better to just make it public? What is the standard in Java?</p>
  
  <p>I was taught to make variables private, and just have getter and setter methods, but it definitely looks better accessing a public list than a private one.</p>
  
  <pre><code>public exampleclassThatContainsTheList.goodieList.add("Candy");
  
  private exampleclassThatContainsTheList.setGoodieList(exampleclassThatContainsTheList.getGoodieList().add("Candy"));
  </code></pre>
  
  <p>That's my opinion, but of course I would prefer to go by standards than to go by what looks good.</p>