The Artima Developer Community
Sponsored Link

Java Answers Forum
Static Variables Storage

1 reply on 1 page. Most recent reply: Oct 24, 2002 7:43 PM by Ramu

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Hima

Posts: 1
Nickname: hima
Registered: Oct, 2002

Static Variables Storage Posted: Oct 17, 2002 9:38 PM
Reply to this message Reply
Advertisement
Hi,
I would like to know how Java stores and handles static variables internally.

I believe they are stored on the stack, but what happens if the memory limit is exceeded?

Also, does Java keep recycling the storage by an algorithm like Least Recently Used(LRU) or it simply gives a Stack Overflow error if the memory limit is exceeded?

Please let me know the answers to these.

Thanks
Hima


Ramu

Posts: 29
Nickname: sripoorna
Registered: Oct, 2002

Re: Static Variables Storage Posted: Oct 24, 2002 7:43 PM
Reply to this message Reply
hi,

what u r saying is exactly correct.
In java static vaiables are stored in the stack because it is very fast to acess. It internally follows the LRU algorithm.

regards
ramu

Flat View: This topic has 1 reply on 1 page
Topic: newbie question: Actual time in Java Previous Topic   Next Topic Topic: arraylist

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use