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
How do you check if two strings are equal in java?
Define how can we find the actual size of an object on the heap?
Can we override a variable in java?
What is composition in java?
Can we store variables in local blocks?
What are keywords in java?
What is an class?
Why java is used everywhere?
What is a website container?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
Where we write javascript code in html page?
Explain wait(), notify() and notifyall() methods of object class ?
What is a memory leak in java?
Can a variable be local and static at the same time?
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?