Accessing scala.None from Java

前端 未结 6 2002
南笙
南笙 2020-12-04 01:14

How can you access scala.None from Java?

The last line causes the compiler to die with \"type scala.None does not take parameters\".

imp         


        
6条回答
  •  孤街浪徒
    2020-12-04 02:04

    Using Scala 2.10.2 (not sure at what version when this came in):

    final Option none = Option.empty();
    

提交回复
热议问题