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


why we use static with only main()class not with other class

Answers were Sorted based on User's Feedback



why we use static with only main()class not with other class..

Answer / nadeem khokhar

actually we never write main m = new main();
so with static function or class we do not have to declare a new memory, those are directly accessible. and definitely i can use static keyword with other classes but then i cant make an object of that class.

Is This Answer Correct ?    1 Yes 0 No

why we use static with only main()class not with other class..

Answer / boxofyuvi

Becoz the class which is stated as static will have the
first preference to execute....

Is This Answer Correct ?    5 Yes 5 No

Post New Answer

More Programming Languages AllOther Interview Questions

how to add Servlet-api.jar file into eclipse 3.3.2 ?

0 Answers   IBM,


what is the difference between primary key and unique key?

2 Answers   KTree, TCS,


In staad pro, how can we design ROOF SLAB?

0 Answers   L&T,


What ports must be open for DCOM over a firewall? What is the purpose of Port 135?

1 Answers  


Write a program to swap the content of two variables without using a third variable.

0 Answers   Zensar,


How should a programmer decide whether to use a macro or a subroutine to accomplish a given logical function

1 Answers   R V College of Engineering, University of Jordan,


smal talk is pure object oriented or not?

0 Answers  


what is the basic and unique feature of dotnet

0 Answers   HCL,


why not instantiating servet using new operator?

0 Answers  


define profiler???

0 Answers  


what is lazy loading in hibernate?Explain in detailed manner?

2 Answers   IBM, TCS,


why Java is not purely object oriented?

9 Answers   Persistent,


Categories