Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can u overload main()method.Give with example.

Answer Posted / rama krishna dwadasi

Yes, We can overloaded main method also,,,,but JVM start
execution from main method with parameters of String args[]
only...so below example output is "Inside second method"

Example:

public class OverloadMain {

public static void main(int a[]) {
System.out.println("Inside first Main Method");
}

public static void main(String args[]) {
System.out.println("Inside Second Method");
}

}

Is This Answer Correct ?    51 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference between comparison done by equals method and == operator?

969


When do we use hashset over treeset?

1058


What is the use of list in java?

986


please send me hr interview questions in it industry

2125


What is the diffrence between inner class and nested class?

1088


What does jenkins do?

908


who can i handle multiple client in RMI

1894


What's the purpose of using break in each case of switch statement?

983


What is singleton service?

962


Can we overload the main() method?

1043


What class allows you to read objects directly from a stream in java programming?

1074


What is double checked locking in singleton?

1052


Can long be null in java?

1015


Write a program to print 15 random numbers using foreach of java 8?

936


How to create an interface?

1084