what is the difference between statis block and static
variable

Answer Posted / kiran

static variable are access and executed with objects or
methods(static or non-static) its a dependent.
static block executed and access independently when the
program starts

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How dead lock situation occurs in java and how you can identify it?

544


Is java a compiler?

569


Which containers use a flowlayout as their default layout in java programming?

512


What does  mean in regex?

571


what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread

563






What is the difference between ArrayList and Vector? which one is better in Java

605


What is bufferedwriter?

542


What is parameters example?

555


What is parameter example?

546


Describe the Big-O Notation.

616


Explain importance of finally block in java?

586


what is meant by HQL?

643


What are access specifiers available in java?

579


Why are functions called methods in java?

533


How many bytes is a char in java?

531