• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Supplied source

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eugene,
Thank you kindly!
Fred
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic