{{theTime}}

Search This Blog

Total Pageviews

What is the output of the HashSet

HashSet<String> set =
new HashSet<String>(Arrays.asList(new String[]{"Java","J2EE",null})) ;
 
Iterator<String> setInterator = set.iterator() ;
while(setInterator.hasNext()){
       System.out.println(setInterator.next()) ;
}
 
Answers:
 
A) NullPointerException
B) HashSet doesn't allow null
C) Runtime Exception
D) Java
    J2EE

No comments:

Windows 8.3 file naming setting is disabled for the product

To enable Windows 8.3 file naming setting use fsutil command Example:  c:\> fsutil 8dot3name set C: 0