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 |
What are the operands of instanceof operator?
what is the main class of all the classes
What is I/O Filter?
How to perform Singleton of the java class object on multi JVM?
In which order the iterator iterates over collection?
How do you square a number?
explain the classification of exception and hoew to handle the exceptions
What is an immutable object?
what is the use/perpose of having a method antive?
What is lambda expression in java?
what do you mean by java annotations?
What is the symbol for average?