Java From Beginner To Advanced
0% completed
Previous
Next
Course
Discussions
Quiz
What will be the output of the following Java code?
String s1 = "Java"; String s2 = "Java"; System.out.println(s1 == s2);
A
true
B
false
C
Compilation Error
D
Runtime Error
Reset Quiz
Check Answer
Question 2
Which class is used to create mutable strings in Java?
Choose all correct options
String
StringBuffer
StringBuilder
Both b and c
Reset Quiz
Check Answer
Question 3
Which of the following methods can be used to compare two String objects for content equality in Java?
A
==
B
compareTo()
C
equals
D
hashCode()
Reset Quiz
Check Answer
.....
.....
.....
Like the course? Get enrolled and start learning!
Enroll
Previous
Next