What is static variable and static method?

Answer Posted / niranjanravi

static variables are classes variables not instance
variables .They are instantianted only once for a
class.They are initialised at class load time.
Static method can be referenced with the name of the name
of the particular object of that class. That's how the
library methods like System.out.println works.

Is This Answer Correct ?    268 Yes 54 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the list interface?

603


What is the difference between size and length in java?

506


What do you understand by overloading and overriding in java?

539


When is the finalize() called?

690


What do you mean by exception handling in Java?

658






What is string made of?

523


Write a program to print the pattern given below

491


What is the main use of java?

567


How many bits is a string?

521


what is a thread pool in java and why is it used?

525


Give me an example of array and linked list? Where they can be used?

549


What are the principle concepts of oops?

532


Why javac is not recognized?

515


Is string is a class in java?

516


What is use of arraylist in java?

579