What is the difference between Static and final?

Answer Posted / vetri

in variable,specifying final the value cant be changed
through
entire program.specifying static means the variable value
will persist between different method calls,automatic
initialization of static variable is zero.static and final
methods cant be overriden with non static or non final method.
but static and final methods can be overriden with static
and final methods in the subclass.

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls

1450


How do you use substring in java?

552


What is a finally block?

568


Why are constructors used?

562


How to find the index of the largest number in an arraylist java?

522






What are some characteristics of interference class?

520


Why java uses the concept of the string literal?

547


Will set allow duplicates in java?

505


When does a class need a virtual destructor?

532


Is linked list a linear or non-linear data structure?

549


Is java map thread safe?

495


Write a program to calculate factorial in java?

586


What is the difference between this() and super() in java?

544


What is unicode full form?

556


What classes of exceptions may be caught by a catch clause in java programming?

709