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 a constructor overloading in java?

1106


When do we use synchronized blocks and advantages of using synchronized blocks?

1280


What is final keyword in java? Give an example.

1063


How do you take thread dump in java?

1058


What does a boolean method return?

1306


Which package has light weight components in java programming?

1195


Can inner class have constructor?

1102


What is the method in java?

1141


How does hashset work in java?

1181


What are peerless components in java programming?

1067


What type of variable is gender?

1044


What is an object class?

1081


What are the main uses of the super keyword?

1024


Similarity and difference between static block and static method ?

979


How is Object Oriented Programming different from Procedure Oriented Programming?

1094