Q:

Java Program to create a new tree set

0

Program to create a new tree set

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import java.util.*;
public class demo1 
{
 public static void main(String[] args)
 {
  TreeSet<String> tree_set = new TreeSet<String>();
  tree_set.add("C#");
  tree_set.add("C++");
  tree_set.add("Java");
  tree_set.add("HTML");
  tree_set.add("Perl");
  System.out.println("Tree set: " + tree_set);
 
 }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now