what is the difference between statis block and static
variable

Answer Posted / suresh.m

staticblock,static variables,static method are executed
before creating an object to be created to class.i think
there is no difference between them.

Is This Answer Correct ?    2 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is console based application in java?

538


In which language java is written?

535


Difference between error and exception

5000


Why is inheritance used in java?

601


Describe the Big-O Notation.

612






How long will it take to learn java?

502


Is java 9 released?

519


Is it possible to use Semaphore/ Mutex in an Interrupt Handler?

530


What is string :: npos?

576


what type of questions asked for barclays technologies pune please send urgent

5226


What is class variable java?

581


What is lambda expression in java?

536


What is the purpose of format function?

618


Why does java have different data types for integers and floating-point values?

529


Is object a data type in java?

583