What is the difference between static and non-static
variables?
Answer Posted / ravikiran
static variables are class variables and the values remains
same fr the whole class
nonstatic variables are of two kinds
global variables:are the variables which defines variables
which can be accesible over the whole class
local variables:the scope of local variables is with tin
the method only
| Is This Answer Correct ? | 29 Yes | 15 No |
Post New Answer View All Answers
How to perform selection sort in java?
Explain jdk, jre and jvm?
What is singleton service?
Is main an identifier?
What is the use of conditional statement?
How do you reverse a string in java?
Can we have multiple public classes in a java source file?
Which class cannot be a subclass in java?
What is string and example?
extending thread class or implementing runnable interface. Which is better? : Java thread
What is a singleton in genetics?
What are the basic control structures?
What is object in java?
Explain when we should make an instance variable private.
What is token in java?