Javaの問題
問題
次のプログラムの実行結果として正しいものを
ア~オの選択肢から選びなさい。
ア~オの選択肢から選びなさい。
public class Test {
public static void main(String args[]) {
HashSet<String> a = new HashSet<>();
LinkedHashSet<String> b = new LinkedHashSet<>();
TreeSet<String> c = new TreeSet<>();
Collections.addAll(a, "b", "b", "a", "a", "c", "c");
Collections.addAll(b, "b", "b", "a", "a", "c", "c");
Collections.addAll(c, "b", "b", "a", "a", "c", "c");
for(String text : a) System.out.print(text+" ");
for(String text : b) System.out.print(text+" ");
for(String text : c) System.out.print(text+" ");
}
}
問題番号:1506031736311作成者:イスンム