File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Collections Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Collections Query" Watch "Collections Query" New topic

Collections Query

narain ashwin
Ranch Hand

Joined: Dec 27, 2007
Posts: 48
I am not able to instantiate a TreeSet passing a List to the constructor like below

whereas the documentation here allows the TreeSet to take a collection.

I drink two cappuccinos a day.Is that of any help to solve java problems??
JBoss 6 - Admin console Username/pwd: admin/admin
narain ashwin
Ranch Hand

Joined: Dec 27, 2007
Posts: 48
My class name matches the API classname ....Fixed it!!Closing the thread now.
I agree. Here's the link:
subject: Collections Query
Similar Threads
NullpointerException in ArrayList,Vector,LinkedList
Help me solve a puzzle on datastructures
sending a Collection from JSP to Servlet
can't understand the output
can arraylist elements replaced?