Linked Questions

3 votes
2 answers
9k views

I want to know where static variables are stored in Java. There are already few questions on SO, like: where is a static method and a static variable stored in java. In heap or in stack memory The ...
Mandroid's user avatar
  • 7,788
1 vote
0 answers
1k views

Are the static members of a class - static variables, static blocks, and static methods stored in the Metaspace region after Java 8? If not, where are they stored? There is no concrete information ...
Syed Zabi Ulla's user avatar
0 votes
2 answers
293 views

Where are static variables stored? Is there any separate memory for the static variables? I know that they are not a part of the object, are they also not part of the Java heap and store d somewhere? ...
user avatar
0 votes
2 answers
255 views

Static members where does they reside. i need an detail explanation of static ,local and instance members memory allocation(variables,methods). Memory management(Is it permanent generation).
Vinay S Jain's user avatar
2 votes
1 answer
122 views

Below is a question that was raised by one of my friends during a discussion but both of us didn't know what the actual answer is. public class Test { static int i = 5; static String str = "Welcome"; ...
Ashishkumar Singh's user avatar
3 votes
0 answers
124 views

I had studied that the static data members of class are getting memory at class loading time in the class information area (CIA) of class area,but i couldn't find out which memory area is for static ...
Manik Arora's user avatar
2096 votes
41 answers
697k views

What real (i.e. practical) difference exists between a static class and a singleton pattern? Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-...
Jorge Córdoba's user avatar
244 votes
6 answers
205k views

I have installed JDK 8 and trying to run Eclipse. I am getting following warning message: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0 What ...
Shamim Ahmmed's user avatar
367 votes
3 answers
302k views

I'm trying to understand What the concepts of young, old and permanent generations are in the Java heap terminology, and more specifically the interactions between the three generations. My questions ...
knorv's user avatar
  • 50.4k
126 votes
1 answer
72k views

I have been lately reading a lot on memory allocation schemes in java, and there have been many doubts as I have been reading from various sources. I have collected my concepts, and I would request to ...
dev's user avatar
  • 11.4k
86 votes
5 answers
9k views

In this code when I create an Object in the main method and then call that objects method: ff.twentyDivCount(i)(runs in 16010 ms) , it runs much faster than calling it using this annotation: ...
Stabbz's user avatar
  • 768
38 votes
7 answers
63k views

A static variable is allocated for the entire duration of a program's execution, so neither stack nor heap are convenient for it. Then where is that variable? Shouldn't there be some place where it is ...
Reuben's user avatar
  • 5,756
14 votes
3 answers
28k views

class A{ static int i = 10; static int j = 20; static void getname(){ } } Where will these variable be stored in memory ?
Deepak's user avatar
  • 167
11 votes
3 answers
13k views

I have found picture from official oracle site but in popular SO answer I have found that permanent generation is not part of heap Permanent Generation (non-heap): The pool containing all the ...
gstackoverflow's user avatar
9 votes
3 answers
9k views

I have four questions regarding static methods in java: 1) When static methods are loaded in memory? when class loaded or when method get called first time? 2) When static method is unloaded from ...
Gaurav Jeswani's user avatar

15 30 50 per page