I was asked to add the three types of comments to this class, each consisting of the same statement (this statement is also printed once). The output/print, block comment, and single line comment has all been marked correct. The Javadoc comment, however, has not.I asked this question earlier and tried implementing that solution, however, it did not work.What should I do to make it work?

Question
Asked Jun 28, 2019

I was asked to add the three types of comments to this class, each consisting of the same statement (this statement is also printed once). The output/print, block comment, and single line comment has all been marked correct. The Javadoc comment, however, has not.

I asked this question earlier and tried implementing that solution, however, it did not work.

What should I do to make it work?

check_circleExpert Solution
Step 1

Java documentation comment: This comment is used to create documentation API. The syntax for this comment is:

Syntax:

/**

Documentation comment

*/

Step 2

Solution:

The documentation comment that you used is incorrect. Use the below Javadoc comment.

 /**

Program comments are nonexecuting statements you add to a file for the purpose documentation.

*/

Step 3

Program:

class Main

{

public static void main(String[] args)

  {

System.out.println("Program comments are nonexecuting statements you add to a file for the purpose documentation.");

//Program comments are nonexecuting statements you add to a file for the purpose documentation

/*Program...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour*

See Solution
*Response times may vary by subject and question
Tagged in

Engineering

Computer Science

Related Computer Science Q&A

Find answers to questions asked by student like you

Show more Q&A add
question_answer

Q: Write a class, AgeMessages , which does the following:a. Ask the user to enter age using a Scannerb....

A: //Import required packagesimport java.util.Scanner; //Definition of class "AgeMessage"public class A...

question_answer

Q: I am trying to write a program to convert an integer to a hexadecimal. How do I do this without us...

A: As there is no particular programming language mentioned, we are doing this conversion of integer nu...

question_answer

Q: Consider the languages below. For each, make a conjecture whether or not it is regular. Then prove y...

A: The given language L = {anbl : n/l is an integer} is not regular language because a DFA cannot be co...

question_answer

Q: Write a program in Eclipse that prompts the user for first name, last name, then secret number. The ...

A: Program plan:Include the required header file.Define the class “Main”.Define the “defaultInfo” metho...

question_answer

Q: The following print code is to find out the ASCII code, character for the decimal codes,and comparis...

A: ASCII chart is shown on the board

question_answer

Q: Eliminate useless productions from S → a |aA| B|C, A → aB|λ, B → Aa, C → cCD, D → ddd|Cd.

A: Identifying non-generating variables:

question_answer

Q: Write a java program called Sales considering the following directions and the sample run. Practice ...

A: The program has the following steps:Declare the variablesReceive the input from the userCalculate th...

question_answer

Q: a. Assuming that x is 1, show the result of the following Boolean expressions.(true) && (3 &...

A: Hey, since there are multiple sub-part posted, we will answer first three sub-part. If you want any ...

question_answer

Q: Assume the following declarations and initializations (MIN, MAX, num) are made just before each sub-...

A: Hey, since there are multiple questions posted, we will answer first question. If you want any speci...