What is the result?

Given: What is the result?

Given: What is the result?

A.
class java.lang.Object class java.lang.Object class java.util.Collection

B.
class java.lang.StringBuilder class java.lang.String class java.util.ArrayList

C.
class java.lang.String class java.lang.String class java.util.ArrayList

D.
class java.lang.StringBuilder class java.lang.String class java.util.List



Leave a Reply 2

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


xxx

xxx

public class Access {
public static void main(String[] args){
StringBuilder s1 = new StringBuilder(“Hello java”);

String s2 = s1.toString();
List lst = new ArrayList();
lst.add(s2);
System.out.println(s1.getClass());
System.out.println(s2.getClass());
System.out.println(lst.getClass());
}
}

b