what is different between static and non static methods ,using
example
Answer Posted / guest
Static:
we dont have to create instance of an object
Staic methods cannot access nonstatic methods.
same with variable static variables cannot access static
variables
Non-Static:
we have to create instance of an object
nonStaic methos canaccess nonstatic methods.
same with variable nonstatic variables can access static
variables
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is a for loop in java?
Which is faster set or list in java?
What is anagram of a string?
What is bean? Where it can be used?
What are benefits of java?
What is the meaning of variable in research?
What is an abstract class and what is it’s purpose?
Is map sorted in java?
How do you detect memory leaks?
What are byte codes?
Why constructor has no return type?
What is a singleton factory?
Differentiate between stringbuffer and string?
what is method reference in java 8?
What is use of map in java?