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 are abstract functions?

1025


What is null in java?

962


Can we call virtual funciton in a constructor ?

2197


What is difference between equal and == in java?

952


What if constructor is protected in java?

1114


how would you implement a thread pool? : Java thread

906


What is collection api?

1042


Is jdk required on each machine to run a java program?

1285


How do you replace all in word?

1060


What is the access scope of protected access specifier?

992


Can we inherit inner class?

1011


Give a practical example of singleton class usage?

1056


What is an object class?

1023


Is double bigger than float?

983


What is a consumer in java?

1009