In Java, which one will be used for comparing whether the two string object str 1 and str? are same

A str1=str2
B strl.equalsingnore Case (strl2)
C strl==str2
D All of the above

Correct Answer: All of the above

String can be compared by using in many ways. Such as if(str 1.equals(str2)); if (str 1.equals Ignore case (str 2) if(str 1.compare to (str 2) = = 0), if (str 1 = = str 2) etc.
Bissoy MCQ

Related Questions

When comparing java.io.BufferedWriter and java.io.FileWriter, which capability exist as a method in only one of two ?
The ends of a string weighing w/metre are attached to two points at the same horizontal level. If the central dip is very small, the horizontal tension of the string throughout is

Next steps