Question: Question: With this as a starting point, format the output of your code to match the expected output. Debugging Practice In the develop section, try
Question: With this as a starting point, format the output of your code to match the expected output.
Debugging Practice
In the develop section, try to compile the code and use the error messages to fix the discrepancies in the code.
It would also be useful to read the comments scattered throughout the code. In Java, comments are denoted either with a //where the comment starts and goes until the end of the line or with /*commentary that goes here between the asterisks and slashes*/. They should be used to add clarification to code when necessary.
Practice With Formatting Output
Now that the code compiles without any errors, try submitting your code.
You'll notice, you don't get points because the format of the output is different than the expected.
The Java language is not dependent on whitespace (new lines, spaces, tabs, etc.) but you should still be aware that these things will still matter when dealing with Strings.
Within double-quotes, whitespace does matter. So the String "my fair lady" and the String " my fair lady" are treated as completely different.
Some highlights in terms of formatting output:
System.out.print() vs System.out.println(): println will start a new line at the end while print does not
Some basic escape characters:
\t adds a tab in the String
adds a new line in the String
\" adds a double quote to the String

With this as a starting point, format the output of your code to match the expected output. Lab Lab1b Due Jan-31 Submission 1.16.1: Movie Quote java Load default template... 1 public class this is a comment, delete this and fill in the proper class name*/ 2 public static void main StringO args) //The between the Strings is called a concatinator and works to combine the Strings together System Someone I once knew wrote that we walk away from our dreams") //Note the N" allows the to be printed as part of the string system out.printlnC"afraid that we may fail or worse yet, afraid we may succeed. //The spaces before the quotation mark do not matter, though it does make the code messier System PrintLnC "-William Forrester 9 Submit In "Develop" mode, you can run your program as often as you'd like, before submitting for grading. Type input Develop values (if desired) in the first box below, then click "Run program" and observe the program's output in the second box. RUN PROGRAM
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
