Does treeset allow null values?



Does treeset allow null values?..

Answer / Vinika Choudhary

No, TreeSet does not allow null values. If you try to add a null value, it will throw a NullPointerException.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

What do you mean by separate chaining?

1 Answers  


What are the advantages of sorting?

1 Answers  


What is the use of prototype?

1 Answers  


A lot of data structures related programs related to only trees and graphs, like the diameter of a tree, removing the loops in a graph etc.

1 Answers   Motorola,


What is dynamic array with example?

1 Answers  


Is binary tree a bst?

1 Answers  


What is the difference between arraylist and linkedlist?

1 Answers  


What are the advantages of linked list over an array?

1 Answers  


Write the syntax in c to create a node in the singly linked list.

1 Answers  


What is indexing an array?

1 Answers  


What is the Difference between sax and dom parser?

1 Answers  


Can you override methods of arraylist?

1 Answers  


Categories