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 is isa relationship?

1060


Which category the java thread do fall in?

1006


Explain the scope of a variable.

1099


Name some classes present in java.util.regex package.

1035


What is a boolean in java?

1054


What is a numeric string?

1031


What is the difference between serial and throughput garbage collector?

1100


Is 0 true or false?

1003


Does java list allow null?

997


Can you tell me range of byte?

992


Explain the purpose of garbage collection in Java?

1033


What are reference variables in java?

1129


Is the milky way in a void?

967


What is method overloading in JAVA? Why is it not present in C ?

1104


What are the legal parameters?

1012