πŸ“Š JAVA
Q. What is the output of the following application?
Code:
String john = "john";
String jon = new String(john);

System.out.println((john==jon) + " "+ (john.equals(jon)));
  • (A) true true
  • (B) true false
  • (C) false true
  • (D) false false
πŸ’¬ Discuss
βœ… Correct Answer: (C) false true

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
1450
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
97%
Success Rate