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 google full form?

959


Can you explain the final method modifier?

952


what is interface in java? Explain

901


Java is pass by value or pass by reference? Explain

933


Can a top level class be private or protected?

993


Is array an object in java?

901


What is a class variable?

977


What is meant by 'bit masking' in java?

1108


What about static nested classes in java?

1072


How do you create a first line indent?

934


What are the advantages of encapsulation in java?

952


What is method in research paper?

1027


How do you sort arrays in java?

874


Where can I find jdk in my computer?

917


What is a nullable field?

986