where final and static variable stored?

Answers were Sorted based on User's Feedback



where final and static variable stored?..

Answer / sadikhasan palsaniya

Code of method and constructor or static and final field of
the class are store in "Method Area" which is non heap Memory.

Is This Answer Correct ?    19 Yes 5 No

where final and static variable stored?..

Answer / pradeep reddy

Final and staic variable is stored in Method area which even stores the class structure like method,constructor and static fields.Method area is a non heap memory.

Is This Answer Correct ?    8 Yes 4 No

where final and static variable stored?..

Answer / srinivaskumar

static and local variable are stored in stack memory,
in case of final variable it is dependent, if final variable is instance it stored in heap, if static it is stored in stack.....

Is This Answer Correct ?    3 Yes 15 No

Post New Answer

More Core Java Interview Questions

What do you mean by an interface in java?

0 Answers  


What are non-access modifiers?

2 Answers   Cognizant,


what is polymorphism?

4 Answers  


Write a java program to generate fibonacci series ?

1 Answers   Cyient,


What is low level language in computer?

1 Answers  


Why is java called the platform independent programming language?

1 Answers  


You're given a Boolean 2D matrix, can you find the number of islands?

1 Answers   Amazon,


Can I override protected method in java?

1 Answers  


What is a void in java?

1 Answers  


What does int argc char * argv [] mean?

1 Answers  


Is java a super set of javascript?

1 Answers  


Given: 10. interface A { void x(); } 11. class B implements A { public void x() { } public voidy() { } } 12. class C extends B { public void x() {} } And: 20. java.util.List list = new java.util.ArrayList(); 21. list.add(new B()); 22. list.add(new C()); 23. for (A a:list) { 24. a.x(); 25. a.y();; 26. } What is the result? 1 Compilation fails because of an error in line 25. 2 The code runs with no output. 3 An exception is thrown at runtime. 4 Compilation fails because of an error in line 20.

3 Answers  


Categories