
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Can We Overload the Main Method in Java
Yes, we can overload the main method in Java, but When we execute the class JVM starts execution with public static void main(String[] args) method.
Example
public class Sample{ public static void main(){ System.out.println("This is the overloaded main method"); } public static void main(String args[]){ Sample obj = new Sample(); obj.main(); } }
Output
This is the overloaded main method
Advertisements