where the static methods will live ,on stack ? can you
explain brefly

Answer Posted / suman rani

As you know static variable directly belongs to the class, so it is be stored in heap area where all the byte code of class are stored.That area is also called permanent code segment area.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of passing this into a method instead of the current class object itself?

1271


What is a static method in java?

648


Explain naming conventions for packages?

669


What is hashmap and map?

628


Can a constructor call the constructor of parent class?

627






What technique can be employed to compare two strings?

688


Is it possible to compare various strings with the help of == operator? What are the risks involved?

720


What about main thread in java?

746


What is hashtable and explain features of hashtable?

650


How long will it take to learn java?

609


Explain aggregation in java?

625


State the main difference between c++ and java?

658


What is Java Reflection API? Why it’s so important to have?

687


Is singleton class immutable?

629


Why hashmap is used in java?

639