What is static variable and static method?
Answer Posted / 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 |
Post New Answer View All Answers
We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.
If two threads have same priority which thread will be executed first ?
Explain when we should make an instance variable private.
How do generics work?
I want to persist data of objects for later use. What’s the best approach to do so?
What are the types of inner classes (non-static nested class) used in java?
What type of variable is gender?
What is t type java?
do I need to use synchronized on setvalue(int)? : Java thread
Are there structures in java?
Can you change array size in java?
What is string value?
What is java in layman terms?
Explain thread life cycle in java?
Which number is denoted by leading 0x or 0x in java?