Java Best Practice Programming Practices

Tutorials Shared by the Internet Community

Advertisements


Synopsis

Java Best Practice Programming Practices

Statistics

  • Total Hits - 5872

  • Total Votes - 7 votes

  • Vote Up - 4 votes

  • Vote Down - 3 votes

  • Domain - www.javatutorialcorner.com

  • Category - JAVA/Core JAVA

  • Submitted By - Appu T

  • Submitted on - 2014-03-16 09:49:08

Description

Providing Access to Instance and Class Variables Don’t make any instance or class variable public without good reason. Often, instance variables don’t need to be explicitly set or gotten—often that happens as a side effect of method calls.One example of appropriate public instance variables is the case where the class is essentially a data structure, with no behavior. In other words, if you would have used a struct instead of a class (if Java supported struct), then it’s appropriate to make the class’s instance variables public.Referring... - See more at: http://www.javatutorialcorner.com/search/label/Java?updated-max=2013-10-06T01:03:00-07:00&max-results=20&start=40&by-date=false ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements