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
What is are packages?
What is finally and finalize in java?
How do you execute a thread in java?
What is exception in java?
What is function declaration?
What do you mean by flow of struts?
how are methods defined?
How do you escape json?
What are different data types?
How do you write a good declaration?
What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory?
Why are arrays useful in java?
What is regex in java?
Why are there no global variables in java?
What is the function of log?