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...

could you run the java program without main method?

Answer Posted / naga

yes,we can write and run a java program without using the
main method.
i.e By using static

example program...!

public void static( )
public class
{
public void static( )
{
System.out.println( "Without main method" );
System.exit(0);
}
}

Is This Answer Correct ?    23 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who is the owner of java?

1046


Can a class declared as private be accessed outside it’s package?

1059


What is object cloning in Java?

1145


Can I learn java without any programming experience?

1087


What’s a deadlock?

1146


Does string isempty check for null?

1081


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

1236


What two classes are used to read data only?

1132


Why is flag used in java?

1133


When we should use serialization?

1086


How do you implement singleton class?

1034


Explain about main thread in java?

1143


What is difference between add() and addelement() in vector?

1580


What is stringwriter?

1019


What is the main advantage of passing argument by reference?

1040