-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimpleString1.java
More file actions
23 lines (20 loc) · 935 Bytes
/
simpleString1.java
File metadata and controls
23 lines (20 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package normalUsageJavaPrograms;
import java.util.Scanner;
public class simpleString1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String name = "Sayan";
int l = name.length();
String name2 = "Banik";
String fullName = name+ " "+ name2;
String subString = fullName.substring(2,11);
String upperCase = fullName.toUpperCase();
String lowerCase = fullName.toLowerCase();
System.out.println("Original String is: "+name);
System.out.println("Entered String's Length is: "+l);
System.out.println("Concatenated String is: "+fullName);
System.out.println("Concatenated String's Substring is: "+subString);
System.out.println("Concatenated String's UpperCase String is:"+upperCase);
System.out.println("Concatenated String's LowerCase String is:"+lowerCase);
}
}