-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringTestLib.java
More file actions
66 lines (37 loc) · 1020 Bytes
/
StringTestLib.java
File metadata and controls
66 lines (37 loc) · 1020 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.testing250.JavaDay2;
public class StringTestLib {
String s1 = "Hello";
String s2 = "world";
String s3;
String s4=null;
public void StringDisplay(String s11) {
s11=s1;
System.out.println(s11);
// check equality
boolean res= s11.equals(s1);
System.out.println(res); //
}
public String StringConcat() {
String s12= "testdata";
String s2 = "test test";
String res1=s12.concat(s2);
return res1;
}
public boolean IgnoreCase() {
String a = "testInG";
String b = "TestING";
boolean res5 = a.equalsIgnoreCase(b);
return res5;
}
public void CheckSubString() {
String p = "Test Atomation Framework";
boolean b = p.contains("Atomation");
System.out.println(b);
}
public void CheckPhoneNum() {
String phno = "+91-9988665599";
if(phno.startsWith("+91-")) {
System.out.println("The number belongs to India");
}
}
}