Computer Applications
Which of the following is a valid comment in Java language?
- /*comment*//
- /* comment
- //comment
- */ comment */
Input in Java
35 Likes
Answer
//comment
Reason — In Java, the comment statements are written using double slash (//).
Answered By
24 Likes
Related Questions
Which of the following is used to enclose a set of statements to form a compound statement in Java program?
- Parenthesis
- Brackets
- Curly brackets
- All of them
Which of the following operators is essentially required while writing if statement?
- Arithmetic
- Relational
- Bitwise
- All of them
Due to which of the following errors, a program does not provide correct result although it has no grammatical mistake?
- Logical
- Syntax
- Type mismatch
- None of the above
A Java statement is given as:
if((a!=b)&&(a==c))Which of the following statements is true?
- b is the smallest number
- b is the greatest number
- a is the smallest number
- Both (a) and (b)