Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » Java




 Page 1 of 1 [ 5 posts ] 



Author Message
 Post subject: multiple choose question
 Post Posted: Fri Nov 27, 2009 8:42 pm 
Offline

Joined: Sat Feb 21, 2009 3:09 pm
Posts: 27
here comes the question

Every java app prog must have a

Code:
A) a method named main
B) more than one class definition
C) one or more comments


i m struck! java application could be widout main method however da
driver class u do have 2 declare i know it was nt but i m sure it has 2
be c am i right???!?!


Top 
 Post subject: Re: multiple choose question
 Post Posted: Fri Nov 27, 2009 8:42 pm 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
Its A, da main thread needs 2 be told where i have 2 start nd then
what it was doin otherwise how would da JVM know where 2 start?

B isnt right you could have an app with just one class with the main method.

C is wrong, you dont need any comments, thats just for programmers reference, the compiler and JVM couldn't care less about comments...

Maybe you need to read up on all three things and then you should understand why its A. Bare in mind this question wouldn't apply to applets...


Top 
 Post subject: Re: multiple choose question
 Post Posted: Fri Nov 27, 2009 8:42 pm 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
A is also incorrect. The application could be an EJB or servlet based system that runs inside an application server. Those have no main method.
Or an applet. Those too have no main method.


Top 
 Post subject: Re: multiple choose question
 Post Posted: Fri Nov 27, 2009 8:42 pm 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
Yes I knew about applets which is why I mentioned it but I dont know about the other types you mentioned so didnt say.
I just presumed the question was refering to a box standard java desktop application because it calls it a java application which is usually the case with newbie questions?
Plus the fact one of the answers must be correct and its definitly not B or C lol

Regards,


Top 
 Post subject: Re: multiple choose question
 Post Posted: Fri Nov 27, 2009 8:43 pm 
Offline

Joined: Sat Feb 21, 2009 3:09 pm
Posts: 27
thanks for the quick responses guys!!:-)


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 5 posts ] 




Board index » Server Side Development » Java


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron