ExamCompetition Forum Question Papers Ask A Question Mock Test Learn & Earn Sign Up Login Menu



0 vote

What 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); }}

Asked on by | Votes 0 | Views: 75 | Tags: computer science     | java programming     | strings     | Add Bounty

What 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); }}

A).  true

B).  0

C).  0

D).  1

E).  Displays error message


Share on Facebook      Share on Whatsapp       Share on Twitter




1 answers

0 vote
Answered by on | Votes 0 |

 false

Join Telegram Group




Answer This Question

Name:
Email:
Answer :
Sum of (5+4)
Submit: