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 the main difference between java platform and other platforms?
What is OOP Language?
How to write custom exception in java?
Why synchronization is important?
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
What is a ternary operator in java?
List the three steps for creating an object for a class?
How we can make copy of a java object?
What is the collection interface?
How do you escape a string?
Does java set allow duplicates?
What function extracts specified characters from a string?
What is anonymous inner class?
What is unicode with example?
What is a superclass?