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 main a function?
What is the protected method modifier?
What is binary tree in java?
Can a abstract class be defined without any abstract methods?
What does sizeof return?
What is get () in java?
Can one thread block the other thread?
Which object oriented concept is achieved by using overloading and overriding?
Why we use multi threading instead of multiprocessing?
What is tostring () method?
What is a null class?
What does %4d mean in java?
Explain the importance of import keyword in java?
Is empty string in java?
Can we use string in switch case in java?