what is different between static and non static methods ,using
example
Answers were Sorted based on User's Feedback
Answer / siva
we should create object form calling Non static method but
no necessary to create object for calling static method
using class name we call static method
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
Can we define constructor in inner class?
How do constructors use this() and super()?
What are jee technologies?
What is a flag and how does it work?
what is method reference in java 8?
How to re-get an object that is collected by garbage collector?
What is ResourceBundle class?
is it possible to instantiate the math class?
Why is core java important?
Is Java Platform Independent if then how?
What are the different types of multitasking?
What happens if an exception is throws from an object's destructor?