What is the need to declare main() method as static in Java?
Answer Posted / s. devanand
In Java, we call any method and variable without creating an
object of the class. Hence we declare main method as static
without creating an object we call the main method.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is lambda used for?
What is the locale class?
What are the advantages of java 8’s date and time api over old date api and joda time api?
When a thread is created and started, what is its initial state?
What is a yaml file in java?
what are the different phases in delivering the project during development and maintenance?
What is javax annotation generated?
there are 67 seats in train . there are only 5 seats in a row and in last row there are only 2 seats. One person can reseve only 5 seat at a time. If person reserving seat , the care is atken that he may get all in row. if seats are not available in row then the arrangement is so that person group get nearby seats. the following class is given public class seat { char name; int seat; boolean isSeatempty } 1.Draw require class digram and object diagram. 2.Write function seatallot(int noofperson) to allocate seat with seat nuber printed for the each name.
What is an actionevent in java?
What is the difference between a while statement and a do statement?
Is lambda functional programming?
What is dialect in java?
What is interceptors in java?
What is javacpl?
What is java persistence api used for?