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

Need to use public,static keywords in main function?

Answer Posted / psreddy

public access modifier we declared then that class visible
to every where and access to any where
bcoz if we write any number business logic classes but
we have to write only one execution logic class for all
these business logic classes
that is why always execution logic class as public
and also there is need of writing static key word
bcoz the execution logic executes only once
other wise we will get runtime exeption

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is function overloading in java?

1310


Why java is secure? Explain.

1050


What is a stringbuffer?

977


Why method overriding is used?

1109


Which collection is ordered in java?

982


What is multithreading and its advantages?

1075


What is anti pattern in java?

975


Why null value is used in string?

1055


Can you override static methods?

1013


When is the finalize() called? What is the purpose of finalization?

1085


What does || mean in vectors?

944


Is array passed by reference in java?

1035


Can list be null in java?

1047


what is synchronization? : Java thread

1031


What does %d do in java?

1057