forked from Nnamdikeshi/Java2545examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMoreStringVariables.java
More file actions
25 lines (19 loc) · 962 Bytes
/
Copy pathMoreStringVariables.java
File metadata and controls
25 lines (19 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package week1_variables_if_else;
public class MoreStringVariables {
public static void main(String args[]) {
String thisClass = "Java Programming";
String classCode = "ITEC 2545";
String characters = "!@#$%^&*)(*&^%$#";
String quote = "Java is to Javascript as Car is to Carpet";
String aStringWithNewline = "College = MCTC\nProgram = ITEC";
String needEscapes = "Tab \t double quote \" in this string";
String moreEscapes = "Backslash \\ and newline \n and double quote \"";
System.out.println("thisClass = " + thisClass);
System.out.println("classCode = " + classCode);
System.out.println("characters = " + characters);
System.out.println("quote = " + quote);
System.out.println("aStringWithNewline = " + aStringWithNewline);
System.out.println("needEscapes = " + needEscapes);
System.out.println("moreEscapes = " + moreEscapes);
}
}