What is use of static, final variable?

What is use of static, final variable?

static variable:- also called class level variable .
Static variables are initialized when class is loaded.
Static variables are initialized before any object of that class is created.
Static variables are initialized before any static method of the class executes

final variable:-
final variable needs initialization always, if you dont initialize it would throw a compilation error.


The static final variables are constants


By:
Date:0000-00-00 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher