Why do we use public static with the main function in Java?
Answer Posted / bheemrao
if we don't use public in main method jvm is looked for main
method but does not found.so run time error will occurred
"main() method must be declared as public". why its static
means in java we can execute methods with object.if we use
static it will execute without object.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is data string?
What is blank final variable?
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 string pool?
Can we extend private class in java?
Does printwriter create a file?
Can you explain the cs option of java interpreter?
What are singleton services?
Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..
What is regex used for?
Is null an object in java?
What is the static field modifier?
How do you use nextline in java?
What is multithreading in java?
What is boolean logic?