Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 11. The Collections Framework > Collection Conversion

Collection Conversion

Collection implementations normally have a constructor that accepts a Collection object. This enables you to convert a Collection to a different type of Collection. Here are the constructors of some implementations:

public ArrayList(Collection c)
public HashSet(Collection c)
public LinkedList(Collection c)


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial