![]() |
VOOZH | about |
The checkedQueue() method of Java Collections is a method that returns a dynamically and typesafe view of the given Set. Any attempt to insert an element of the wrong type will result in an immediate ClassCastException.
Syntax:
public static <E> NavigableSet<E> checkedNavigableSet(NavigableSet<E> set, Class<E> datatype)
Parameters:
Return Type: This method will return the dynamically and typesafe view of the given Set.
Exceptions:
Example 1:
[R, java, php/jsp, python]
Example 2:
[1, 2, 3, 4]