Comments in Java: Syntax & Example


Choose an answer and hit 'next'. You will receive your score and answers at the end.

question 1 of 3

How is a single line comments created in Java?

Create Your Account To Take This Quiz

As a member, you'll also get unlimited access to over 79,000 lessons in math, English, science, history, and more. Plus, get practice tests, quizzes, and personalized coaching to help you succeed.

Try it risk-free
Try it risk-free for 30 days. Cancel anytime
Already registered? Log in here for access

1. What is an example of multi-line comment ?

2. What does JDK stand for ?

Create your account to access this entire worksheet
A Premium account gives you access to all lesson, practice exams, quizzes & worksheets
Access to all video lessons
Quizzes, practice exams & worksheets
Certificate of Completion
Access to instructors
Create an account to get started Create Account

About This Quiz & Worksheet

Answer these questions to make sure you know how to use comments in Java. You will be asked to identify specific types of comments and how they are used.

Quiz & Worksheet Goals

In this set of quiz and worksheet questions you'll test your understanding of concepts like:

  • How to nest comments
  • Examples of documentation comments
  • Single-line comment creation

Skills Practiced

  • Reading comprehension - ensure that you draw the most important information from the lesson, such as how to recognize examples of multi-line comments
  • Defining key concepts - ensure that you can accurately define main phrases, such as JDK
  • Knowledge application - use your knowledge to answer questions about the different varieties of comments creatable in Java

Additional Learning

If you are still curious about this part of Java, read the lesson titled Comments in Java: Syntax & Example. New information covered will include:

  • How compilers view comments
  • Why comments are helpful in Java coding
  • Examples of multiple nested comments