Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit de94eae

Browse files
Demonstrates the use of escape sequences.
1 parent 18a9787 commit de94eae

File tree

1 file changed

+18
-0
lines changed
  • textbook work/java software solutions/2. Data and Expressions

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//********************************************************************
2+
// Roses.java Author: Lewis/Loftus
3+
//
4+
// Demonstrates the use of escape sequences.
5+
//********************************************************************
6+
public class Roses
7+
{
8+
//-----------------------------------------------------------------
9+
// Prints a poem (of sorts) on multiple lines.
10+
//-----------------------------------------------------------------
11+
public static void main(String[] args)
12+
{
13+
System.out.println("Roses are red,\n\tViolets are blue,\n" +
14+
"Sugar is sweet,\n\tBut I have \"commitment issues\",\n\t" +
15+
"So I'd rather just be friends\n\tAt this point in our " +
16+
"relationship.");
17+
}
18+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /