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
Is it possible to override private or static method in java?
What is singleton class example?
Is static a keyword in java?
Can a class extend 2 classes in java?
How many digits is int32?
Which is fastest collection in java?
What is the purpose of using bufferedinputstream and bufferedoutputstream classes?
Can a method be static?
Is finalize() similar to a destructor?
Can a constructor call another constructor?
What is the covariant return type?
Tell me a few examples of final classes defined in Java API?
What is lambda programming?
Does java linked list allow duplicates?
What is keyword and identifier?