-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPractical3.java
More file actions
30 lines (25 loc) · 894 Bytes
/
Practical3.java
File metadata and controls
30 lines (25 loc) · 894 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
26
27
28
29
30
import java.util.Scanner;
class Escape_Sequence_Characters
{
public static void main(String[] args)
{
//Q1
//String name = "Amit Shah";
//System.out.println(name.toLowerCase());
//Q2
//String text = "Oh MY Friend Ganesha";
//text = text.replace(" ", "_");
//System.out.println(text);
//Q3
//String letter = "Dear <|name|>, Thanks a lot!";
l//letter = letter.replace("<|name|>", "AMAN");
//System.out.println(letter);
//Q4
//String myString = "This string contains double and triple spaces";
//System.out.println(myString.indexOf(" "));
//System.out.println(myString.indexOf(" "));
//Q5
//String myLetter = "Dear AMAN,\n\tThis Java Course is Nice.\nThanks!";
//System.out.println(myLetter);
}
}