answersLogoWhite

0

Yes. The main method is just like any other java method and can be overloaded.

But - Only the method with public static void main(String[] args) signature will get invoked when the class is run.

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
BeauBeau
You're doing better than you think!
Chat with Beau
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
More answers

No. The only way Java can distinguish between different versions of overloaded methods is the parameter list.

User Avatar

Wiki User

14y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Can a main method in java be overloaded?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering