-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEx4String.java
More file actions
22 lines (17 loc) · 830 Bytes
/
Ex4String.java
File metadata and controls
22 lines (17 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package JavaEntry;
public class Ex4String {
public static void main(String[] arg){
String stringText = "Java Practice Example 4";
String stringText2 = " With String details";
System.out.println(stringText + ", the length of the text is " + stringText.length());
System.out.println(stringText.toUpperCase());
System.out.println(stringText.toLowerCase());
System.out.println("Practice word position is " + stringText.indexOf("Practice"));
System.out.println(stringText.concat(stringText2));
String x = "10";
String y = "5";
System.out.println("Concatenation - " + (x + y)); // Integer will add, string will concate
String speText = "If you have a some \"special's\" text in between text";
System.out.println(speText);
}
}