MCQ Single Best Answer Not Set

QThe output of the following fraction of code is
public class Test{
        public static void main(String args[]){
	        String s1 = new String("Hello");
		String s2 = new String("Hellow");
		System.out.println(s1 = s2);
	}
}

ID: #2214 String in Java 2,091 views
Question Info
#2214Q ID
Not SetDifficulty
String in JavaTopic

Choose the Best Option

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

  • A Hello
  • B Hellow
  • C Compilation error
  • D Throws an exception
Correct Answer: Option B

Explanation

Hellow

Share This Question

Challenge a friend or share with your study group.