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 18. Advanced Types > Existential Types

18.8. Existential Types

Existential types were added to Scala for compatibility with Java wildcards. An existential type is a type expression followed by forSome { ... }, where the braces contain type and val declarations. For example,

Array[T] forSome { type T <: JComponent }


  

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