Leave a Reply 3

Your email address will not be published. Required fields are marked *


renko

renko

Answer: C
package q065;

class MyString {
String msg;

MyString(String msg) {
this.msg = msg;
}
}
package q065;

public class Test {

public static void main(String[] args) {
System.out.println(“Hello “+ new StringBuilder(“Java SE 8”));
System.out.println(“Hello “+ new MyString(“Java SE 8”));
}

}
Output:
Hello Java SE 8
Hello q065.MyString@15db9742