Question: The attached image shows a program that illustrates how Java handles strings. Six string objects are declared and initialized with Hello, including str3 and str4.
The attached image shows a program that illustrates how Java handles strings. Six string objects are declared and initialized with "Hello", including str3 and str4.
Why then is the output in line 20, "true" but lines 23 and 24 are "false"?
What would be the output if we compare str3 and str4 or str5 and str6 with theequals()method?

Main.java X @ Console X 1 import java. util. Scanner; A
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
