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

Suppose server object is not loaded into the memory, and the client request for it , what will happen?

0 Answers  


major characteristics of software system

0 Answers  


3 members in a pf.how we read 3 members without using ovrdbf.using rg pgms....

0 Answers   CTS,


Diffrence between 2.0,3.0,3.5,4.0. versions of .net?

0 Answers  


I need source code for Enrollment System using Visual Basic 6.0/2008 database MS Access 2007 for my school thesis project...please help me..kindly send in my email jpinedamcp@gmail.com

0 Answers  






hi i m deepak my shedule for NIC pi is 17 Apr please contact me if anybody has interview on same day or give me some idea who have faced

0 Answers  


needs examples for black box testing and white box testing

1 Answers   CTS, IBM, Wipro,


What is easiest way to get the PL/i compiler,I didn't have found the compiler in my library. Is there any extra cost if we want to access the PL/1 programs?Actually we r having Mainframe rented training Ids

0 Answers  


Hi Guys, This is Rama, right now I am working as a Software Test Engineer in Gurgoan and I have over all 3 years of testing expoeriance. Right now I am looking for a change. Can any body help me out to find a job in south india. Thanks in Advance

0 Answers  


How to connect the .accdb database file of microsoft access to the Visual Basic 6.0 forms?

0 Answers  


What is the use of sas software? Is sas and sap are different?

0 Answers  


why we use mantis? what u mean mantis in IT trends? addvantages of mantis?

0 Answers   HCL, Sacred Heart College,


Categories