Programming Language › String in Java › Question #2213
Single Choice Not Set

QWhat will be the output of the following program code?
class LogicalCompare{
        public static void main(String args[]){
                String str1 = new String("OKAY");
                String str2 = new String(str1);
                System.out.println(str1 == str2);
        }
}

ID: #2213 String in Java 1,168 views
Question Info
#2213Q ID
Not SetDifficulty
String in JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A true ✔ ✖
  • B false ✔ ✖
  • D 1 ✔ ✖
Correct Answer

Explanation

false

Share This Question

Challenge a friend or share with your study group.