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 we write a program without main() function?

Answer Posted / gandhi gorantla

Yes we can,try it
class d
{
static{
System.exit(0);
}
}
it compiles and executes without error in java.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

a value that does not change during program execution a) variabe b) argument c) parameter d) none

1238


Explain how can you check to see whether a symbol is defined?

1197


write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.

2529


What is the difference between abs() and fabs() functions?

1127


difference between native and cross compilers

2127


What is use of integral promotions in c?

1148


What is getche() function?

1044


What is the use of getchar() function?

1133


Difference between Function to pointer and pointer to function

1074


Why static is used in c?

1096


List the difference between a "copy constructor" and a "assignment operator"?

1017


What is a macro in c preprocessor?

1103


When can you use a pointer with a function?

1069


What is a const pointer?

1122


What are loops in c?

1002