What is static variable and static method?

Answer Posted / rajesham

static variables are global variables for which memory is
allocated on loading of class.
for this variable memory allocated only once,but use more
than once.
static method is a class method.
static method performs class operation.
static method can not operate instance data directly.
static method is use without "this" reference.
static method is bind with class name or object name

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a class component?

720


Is java a compiler?

653


Why object class is super class for every class in java?

671


Can an integer be null java?

659


What about abstract classes in java?

703






Why we override equals() method?

659


What are different access specifiers in java? Explain

734


How do you define a parameter?

673


Is nullpointerexception checked or unchecked?

650


What is unmodifiable list in java?

615


What is the main use of java?

670


What is arrays sort in java?

657


What is the collections api in java programming?

654


Explain different ways of creating a thread?

612


How do I start learning java?

650