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 to obtain a performance profile of java program

778


How do you use compareto method?

765


Why do we use regex?

777


Hi all, I am dng a mini project on FileSplitter application which splits the GBs of logfile into Smaller chunks(mbs) depending on the split size." How to handle GBs file? I am getting OutOfMemoryException, when I input such GB sized file. Thx

1850


What is the exception hierarchy in java?

741


What is the difference between public, private, protected, and friend access?

801


What is output buffer?

799


What is the difference between char and char *?

777


What is the benefit of lambda expressions?

756


What is anagram of a string?

719


What environment variables are required to be set on a machine in order to run Java programs?

885


What is complexity in java?

759


What is string builder in java?

776


What is method reference in java?

826


What is palindrome in java?

756