πŸ“Š JAVA
Q. What will be the output of the following program?
Code:
public class Test{
        public static void main(String args[]){
  String s1 = "java";
  String s2 = "java";
  System.out.println(s1.equals(s2));
  System.out.println(s1 == s2); 
        }
}
  • (A) false true
  • (B) false false
  • (C) true false
  • (D) true true
πŸ’¬ Discuss
βœ… Correct Answer: (D) true true

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
75
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Neelam Mittal
Publisher
πŸ“ˆ
96%
Success Rate