Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Is it correct to use a Singleton Design Pattern for a Utility class?
Fernando Franzini - Java Blog
Roel De Nijs wrote:I see your other question is already been answered by the Great King of Brasil and God himself
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
Pieter Jacobs wrote:the Singleton Pattern could work perfectly for a class that purely reads something from a Properties File instead of reading the Properties file every single time someone uses it ?
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
1- Thanks; so one would rather create a Utility class and make all methods static and prevent people from instantiating the class ?
2- Ps: I went out and bought myself the book: "Head First Design Patterns" and what an excellent book!!!
3- As I could gather from all of your guys' responses and what I read from this above mentioned book; the Singleton Pattern could work perfectly for a class that purely reads something from a Properties File instead of reading the Properties file every single time someone uses it ? ( your feelings ? )
Fernando Franzini - Java Blog
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
It's never done THAT before. Explain it to me tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
|