String a = "Cat";
String b = "cat";
System.out.println(a.equals(b));What is printed?
- A
true
- Bcheck_circle
false
- C
1
- D
0
Explanation
equals is case-sensitive; "Cat" and "cat" differ in case, so it returns false.
AP Computer Science A· difficulty 3/5
String a = "Cat";
String b = "cat";
System.out.println(a.equals(b));What is printed?
true
false
1
0
Explanation
equals is case-sensitive; "Cat" and "cat" differ in case, so it returns false.
Want 10 more like this — adaptive to your weak spots?