Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Supplied source

 
Fred Barnes
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
should you reformat the supplied code? e.g.. Remove unused import statements, remove all wildcard imports. Add javadoc comments to instance variables and correct missing javadoc elements like @return?
When should you use a wildcard import? e.g.. More that 3 classes from a specific package is used?
regards
fred
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

When should you use a wildcard import?

I don't think there is a Java Coding Guideline for this, but there are 2 different schools of thought on this issue. One prescribes to always use wildcard import so that you don't have dozens of imports clattering your source code, and the other one prescribes to never use wildcard import, so that you can always see which particular classes are used. Perhaps the right choice is somewhere in between.
Eugene.
 
Fred Barnes
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eugene,
Thank you kindly!
Fred
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic