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

Why convert an applet to an application?

1161


What is contractor means and methods?

1035


Why doesn't the java library use a randomized version of quicksort?

1034


Which number is denoted by leading 0x or 0x in java?

1099


What is the primary benefit of encapsulation?

1153


What is a dot notation?

1102


Can you make a constructor final?

1076


What is regex in java?

991


What is extension method in java?

1092


How do you replace all in word?

1131


What is operator overloading. Is it is supported in java?

1092


Can we write multiple catch blocks under single try block?

1145


Differentiate between postfix and prefix operators in java.

1183


What is string intern in java?

1089


In the below example, what will be the output?

1082