File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes static HashMap Vs static block Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "static HashMap Vs static block" Watch "static HashMap Vs static block" New topic
Author

static HashMap Vs static block

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1300
I want to cache the data first time from the static block / HashMap, then use it from the cache. Which is the best option static HashMap / static block ?
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 5874
    
    6

It's not really clear what you're asking, and "best" never has one simple answer, but one reasonable approach to what I think you're talking about is:


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static HashMap Vs static block
 
Similar Threads
Confusion about interfaces, creating your own classes, casting
NaturalLanguageMultiplier
Do static objects exist for the lifetime of an application?
can cache be loaded throught private constructor
creating pdf,xml,doc file using servlet