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
How can constructor chaining be done using this keyword?
Is multiple inheritance supported by java?
What is jar?
What is meant by 'bit masking' in java?
Can we sort set in java?
What are the fileinputstream and fileoutputstream?
How strings are created in java?
What is the difference between actual and formal parameters?
What is meant by javabeans?
List some java keywords sun like c, c + + keywords?
What is the maximum size of byte array in java?
Can anonymous class have constructor?
What will be the initial value of an object reference which is defined as an instance variable?
Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).
What is difference between java and java ee?