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 kinds of processors?
Is main an identifier?
What are thread safe functions?
Explain the importance of import keyword in java?
Explain different ways of passing arguments to sub-routine?
Difference between Application and Applet ?
Is java an ide?
What are selection structures?
What is the purpose of the return statement?
What is mvc in java?
What is the need of transient variables in Java ?
Suppose there is a System A which gives some output. This output is used as input by system B. The rate at which System A produces is faster than the rate at which system B consumes it. How can you improve this?