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
Explain about the select method with an example?
Can we call the run() method instead of start()?
Can we override constructors in java?
Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example
What is an example of a constant variable?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
What are the 6 boolean operators?
If an object is garbage collected, can it become reachable again?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
What is jar?
What are identifiers in java?
Is singleton class thread safe?
How long will it take to learn java?
What is java Applet?
What types of index data structures can you have in java?