1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
grin007 [14]
4 years ago
8

Open Comments.java and write a class that uses the command window to display the following statement about comments:

Computers and Technology
1 answer:
riadik2000 [5.3K]4 years ago
8 0

Answer:

Answers to the code are given below with appropriate guidelines on definitions and how to properly run the code

Explanation:

//3 ways to comment are as follows:

//1. This is a one line comment.

/**

* 2. This is a documentation comment.

* @author Your name here

*

*/

/*

*3. This is a multiple line comment

* */

public class Comments {

//Driver method

public static void main(String[]args) {

/*

* All the text written inside the

* sysout method will be displayed on

* to the command prompt/console*/

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

System.out.println("3 ways to add comments in JAVA are as follows: \n");

System.out.println("1. One line comment can be written as:\n//Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n");

System.out.println("2. MultiLine comment can be written as:\n/* Program comments are nonexecuting \n * statements you add to a file for the \n * purpose of documentation.\n */\n");

System.out.println("3. Documentation comment can be written as follows:\n/**\n * Program comments are nonexecuting statements you add to a file for the purpose of documentation.\n **/");

}

}

Steps to Run:

1. Make file named Comments.java, and copy paste the above code.

2. Open command prompt and then go to the directory where you have saved the above created file.

3. The before running compile the code by using command

javac Comments.java

4. Now, run the code by the below command

java Comments.

Congrats your assignment is done!!

You might be interested in
What type of major application has most changed the way people interact in their daily lives?
kogti [31]
Social media, Facebook has become really popularized as has youtube and tumblr. Many people communicate through messenger on facebook, videos on youtube and just posting different things on tumblr. The way people put themselves out into the world, and portray who they are to people across the world is huge change from say 20 years ago.
5 0
3 years ago
17. When looking for information on a web site, what is the easiest method to find that information? The search button The searc
Ket [755]

Answer:

<h3>Using search engines</h3>

Explanation:

<h3>With billions of websites online today, there is a lot of information on the Internet. Search engines make this information easier to find. Let's look at the basics of using a search engine, as well as some techniques you can use to get better search results.</h3>
5 0
3 years ago
Which of the following is the correct order of the SDLC?
Anastasy [175]
I say when in doubt, go with c
3 0
3 years ago
5. This is a variable that controls the number of iterations performed by a loop. a. loop control variable b. accumulator c. ite
NNADVOKAT [17]

what is the ropeak??need only one Ans the 2nd Ans will be reported.

4 0
4 years ago
Create a file named network.py. The file should be created in the same directory as health_checks.py, i.e., scripts. If you are
Archy [21]

Answer:

There is a distinction between where the script exists, given by __file__, and the current working directory (usually the place from which the script was invoked), given by os.getcwd(). It is not entirely clear from the question wording which one was intended, although they are often the same.

8 0
3 years ago
Other questions:
  • What is most likely kept in as database
    15·1 answer
  • Which rule should be followed to stay safe online
    5·1 answer
  • FREE POINTS AND BRAINLIEST!!!<br><br> You guys are welcome. :)
    15·2 answers
  • The four compass points can be abbreviated by single-letter strings as "N", "E", "S", and "W". Write a function turn_clockwise t
    15·1 answer
  • Can anybody do Algorithm 2 for me (with Python).<br> Answer = 25 points.
    13·1 answer
  • Which statement is most likely to be true about a computer network?
    12·2 answers
  • . List down mental health problems that may arises with excessive use of digital social networking Do we ever need to be concern
    12·1 answer
  • A computer reads a sequence from top to bottom and left to right.
    13·1 answer
  • In attempts to improve their contribution to the environment a company decides to adapt green computing. Which of these techniqu
    13·1 answer
  • Use port in a sentence
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!