English

Which of the following is the right way to use a comment in Java program? - Computer Applications

Advertisements
Advertisements

Question

Which of the following is the right way to use a comment in Java program? 

Options

  • /* comment */

  • /* comment

  • // comment //

  • */ comment */

MCQ

Solution

/* comment */

Explanation:

/* comment */ is used to write multi-line comments.

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.06: Input in Java - EXERCISES [Page 65]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.06 Input in Java
EXERCISES | Q I. 1. | Page 65
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×