forked from bitcocom/JavaTPC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTPC35.java
More file actions
34 lines (29 loc) · 686 Bytes
/
Copy pathTPC35.java
File metadata and controls
34 lines (29 loc) · 686 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
public class TPC35 {
public static void main(String[] args) {
String str1=new String("APPLE");
String str2=new String("APPLE");
if(str1==str2) {
System.out.println("YES");
}else {
System.out.println("NO");// V
}
if(str1.equals(str2)) {
System.out.println("YES"); // V
}else {
System.out.println("NO");
}
//-------------------------------------------
String str3="APPLE";
String str4="APPLE";
if(str3==str4) {
System.out.println("YES"); // V
}else {
System.out.println("NO");
}
if(str3.equals(str4)) {
System.out.println("YES"); // V
}else {
System.out.println("NO");
}
}
}