Step 1: Understanding comments in programming.
Comments are lines in a program that are ignored by the compiler. They are used by programmers to explain code, provide documentation, or make the program easier to understand.
Comments do not affect the execution of the program.
Step 2: Types of comments in Java.
Java supports two main types of comments:
Single-line comments: These comments start with the symbol //. Everything written after this symbol on the same line is treated as a comment.
Multi-line comments: These comments start with /* and end with */. They can span multiple lines.
Step 3: Evaluation of options.
(A) /* : Incorrect. This symbol begins a multi-line comment but does not represent a single-line comment.
(B) *\ : Incorrect. This symbol does not represent a comment in Java.
(C) // : Correct. It is used to write a single-line comment in Java.
(D) \\ : Incorrect. This symbol is not used for comments in Java.
Step 4: Conclusion.
Thus, the symbol used to write a single-line comment in Java is //.
Final Answer: //