2.8k views
2 votes
When program execution starts, which method is called?

a. main()
b. constructor()
c. accessor()
d. none of the above

1 Answer

5 votes

Final answer:

The main() method is called when program execution starts and serves as the entry point of the program.

Step-by-step explanation:

When program execution starts, the main() method is called. This is the entry point of the program where the execution begins. In Java, the main() method is required and it serves as the starting point for the program. It is used to define the tasks that the program should perform.

User Syed Rafay
by
7.9k points