• Post Reply Bookmark Topic Watch Topic
  • New Topic

Writing Util classes  RSS feed

 
Guru MaheswaraReddy
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
While writing util classes Do we need to write one interface and implementation or only util class with private constructor?
Which is the best java coding practice?
When do we really need an interface and implementation?


Thanks,
Guru
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on what your utility class is doing and whether it is likely to need different implementations and whether or not you want people or another program to use it as a public API

Hope that all made sense!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!