what is the difference between static block and static
method

Answer Posted / raghavendra

As soon as the class is loaded, the static block will be
executed. Where as the static method should be called
explictly.

Is This Answer Correct ?    51 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is void a wrapper class?

537


What is a instance variable in java?

555


How do you allocate memory to object?

524


What is the difference between java applets and applications?

571


What is meant by attribute?

599






I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

593


What is meant by stack and queue?

608


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

857


Why super is first line in java?

564


What is charat java?

546


What is double in java?

520


How to provide security in java

1806


Write a program to find the greatest of three numbers in java?

565


What is empty string literal in java?

567


Explain about oops concepts.

638