What is static variable and static method?

Answers were Sorted based on User's Feedback



What is static variable and static method?..

Answer / aravind

a variable declared inside a method is local to that method.
it can't be accessed outside the method. if a variable
declared in a class means its a global variable.if we
declare a variable with static keyword in a class means it
can be accessed by all the class.

Is This Answer Correct ?    18 Yes 22 No

What is static variable and static method?..

Answer / ravikiran(aptech mumbai)

static variable is a class variable which value remains
constant for the entire class
static method is the one which can be called with the class
itself and can hold only the staic variables

Is This Answer Correct ?    43 Yes 63 No

Post New Answer

More Core Java Interview Questions

What restrictions are placed on method overriding?

0 Answers  


What are the types of web technologies?

0 Answers  


What is hypertext?

1 Answers  


What is advantage of java?

0 Answers  


What restrictions are placed on method overloading and method overriding?

5 Answers  






Why do we create threads in java?

0 Answers  


What is a super class and how super class be called?

3 Answers  


Explain your academic project?

2 Answers   Accenture, Levonsys, SDF, TCS, Tech Mahindra,


what is run time polymorphism

4 Answers  


What is use of arraylist in java?

0 Answers  


How to use arraylist in java netbeans?

0 Answers  


Is it possible to use Semaphore/ Mutex in an Interrupt Handler?

0 Answers   Ciena,


Categories