GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  Programming  >  Java

 Print  |  
Question:  Which of the option correctly describes the comments in java1) // -- single line comment2) /* --*/ multiple line comment 3) /** --*/ documentation

Answer: A) 1, 2
B) 2, 3
C) 3, 1
D) 1, 2, 3


December 12, 2005 22:07:39 #1
 sandeep cheema J2EE Expert  Member Since: December 2005    Total Comments: 8 

RE: Which of the option correctly describes the commen...
 
All these are legal comments in java.The third one, /**This is a comment */ might look new to c++ programmers,but it is very beneficial for the purpose of documentation,i.e. preparing a separate document file alongwith.
     

 

Back To Question