package collection;
import java.util.*;
public class SortedSet {
public static void main(String[] args) {
// TODO Auto-generated method stub
SortedSet set = new TreeSet();
}
}
It giving me following error:
Type mismatch: cannot convert from TreeSet to SortedSet
Your class name is also SortedSet
, so it is hiding java.util.SortedSet
. Either rename your class (the preferred option) or use the full name of the interface in your variable declaration.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments