Question: Illustrate the two ways to provide comments in a Java program by writing the following as comments. Use a different comment format for each of

Illustrate the two ways to provide comments in a Java program by writing the following as comments. Use a different comment format for each of the two sentences. This is a relatively long sentence that, if embedded in a Java program, would confuse the Java compiler and cause an error to be generated unless, of course, it was commented out. 

This is a relatively short sentence.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Comments are a way of embedding notes or explanations within your code They arent executed when you ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction To Programming With Java A Problem Solving Approach Questions!