下列Application程序中,指定as为字符串数组类型,先创建一个HashSet对象并赋值,然后在屏幕输出s,

9 查阅

下列Application程序中,指定as为字符串数组类型,先创建一个HashSet对象并赋值,然后在屏幕输出s,请将程序补充完整。

import java.util.*;

public class test17_1{

public static void main(String[] args){

__________s=new HashSet();

s.add("Hello");

s.add("World");

s.add(new Character('我'));

s.add(new Integer(23));

s.add("Hello");

__________as={"W","o","r","1","d"};

s.add(as);

s.add(null);

s.add(new Integer(23));

s.add(null);

System.out.println(__________);

参考答案:

Set String[] sSet String[] s

计算机二级