-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQ_16.java
More file actions
35 lines (31 loc) · 682 Bytes
/
Q_16.java
File metadata and controls
35 lines (31 loc) · 682 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
package New;
import java.util.Scanner;
public class Q_16 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
String one,two,three,four;
System.out.println("Enter First String");
one=sc.next();
System.out.println("Enter Second String");
two=sc.next();
System.out.println("Enter Third String");
three=sc.next();
System.out.println("Enter Fourth String");
four=sc.next();
System.out.println(one.equals(two));
System.out.println(three.equalsIgnoreCase(four));
}
}
/*Output
Enter First String
Apple
Enter Second String
apple
Enter Third String
BANANA
Enter Fourth String
banana
false
true
*/