what is the difference between statis block and static
variable

Answer Posted / ramakrishna

Static block is the block which is executed first in the
program. Static variable is the common variable which is
shared by all the objects. Static variable is not specific
to any object.

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by the term singleton?

582


What are computer functions?

481


What is the difference between applet and application?

544


Why can we not override static method?

591


How to check if linked list contains loop in java?

459






How many types of assembly languages are there?

527


How java enabled high performance?

584


Is it safe to install java on my computer?

541


What happens if an exception is throws from an object's destructor?

581


How do singleton patterns work?

518


What is the final keyword?

553


Write a function for palindrome and factorial and explain?

661


How do you replace all in word?

533


What is null statement?

535


Can each java object keep track of all the threads that want to exclusively access it?

539