From 1925 through 1963, Burma Shave advertising signs appeared next to highways all across the United States. There were always four or five signs in a row containing pieces of a rhyme, followed by a final sign that read “Burma Shave.” For example, one set of signs that has been preserved by the Smithsonian Institution reads as follows:
Shaving brushes
You'll soon see 'em
On a shelf
In some museum
Burma Shave
Write, compile, and test a class that outputs five lines so that each displays one line of this Burma Shave slogan in turn.
///What's wrong with this code? It says that does not display the correct output? This was my answer:///

Dear Student,
You cannot display a message box in an online compiler. So you have to program for console application.
Please find the below code:
public class Main
{
public static void main(String[] args) {
System.out.println("Shaving
brushes\nYou'll soon see'em\nOn a Shelf\nIn some museum\nBurma
Shave");
}
}
Explanation:
You have to use System.out.println() to print in console
application. and all the online compilers are of console
application
Screenshot of output:
![1 public class Main 2 public static void main(String[] args) { System.out.println(Shaving brushes\nYou11 so 3 T seeem\nOn](http://img.homeworklib.com/images/f1c8b4b4-c43e-4f19-958d-59b05cd93a32.png?x-oss-process=image/resize,w_560)
If you have any doubt please comment below for clarification also please don't forget to hit the thumbs up button Thank you :)
From 1925 through 1963, Burma Shave advertising signs appeared next to highways all across the United...