- A Yes, the main() method can be overloaded in Java.
- B No, the main() method cannot be overloaded in Java.
- C Overloading the main() method is possible, but it is considered bad practice.
- D Overloading the main() method is possible, but it will cause a runtime error.
- Share this MCQ
Answer:
A
Share this MCQ
The main() method can be overloaded in Java, meaning that multiple versions of the main() method can be created with different parameters. This is useful when the program needs to be executed with different sets of arguments. However, it is considered bad practice to overload the main() method as it can lead to confusion and errors.
Click me to Read more Question & Answer of Java Interviews MCQsShare this MCQ