View Single Post
  #1  
Old 12-01-2009, 06:30 AM
aaren47 aaren47 is offline
Junior Member
 
Join Date: Nov 2009
Location: U.K
Posts: 20
aaren47 is on a distinguished road
Default Java Tips And Tricks

Hi

Tips to make your program better
1. Don't make any class file larger than 1000 lines
2. Avoid Using Global Static function, if not possible then put that all function in a separate class.
3. Before starting the project Check out the proper decomposition of classes, interface and function. Practice of making structure then start coding.
e.g All Nouns is the probable candidate for classes and All Verbs are probable candidate for functions. User Interface wherever possible.
4. Always try to features given by java, don't try to write your own code if java provide such thing like StringBuffer, HashMap, ArrayList etc.
5. Always use the System properties handled by java for example. Don't use "\n" u can use
System.getProperty("line.separator");
6. Properly handle exception and their preferred treatment and if possible create a separate Exception Handling class where After Error message that thrown exception will be caught.
7. Avoid use of public data types for any class.

Keep sharing and reading

Thanks
__________________
Spam Services
Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Location: Here
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote