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 do bitwise operators do?
What is jvm? Why is java called the platform independent programming language?
What is a substitution variable?
What is java objectoutputstream?
What is an immutable class? How to create an immutable class?
How do weakhashmap works?
What is bifunction in java?
What is int argc char * argv?
What does the “static” keyword mean?
What is files manifesting?
What is unicode full form?
Does java support function overloading, pointers, structures, unions or linked lists?
State the main difference between c++ and java?
What is the difference between variable & constant?
What is scope & storage allocation of static, local and register variables? Explain with an example.