KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to return from a Java method a reference to a Scala object. How can I do that? My Scala objects are like this: trait Environment object LocalEnvironment extends Environment {...} object ServerEnvironment extends Environment {...} ... and I want my Java method to be like this: Environment getEnvironment() { return LocalEnvironment; } // DOES NOT COMPILE Is there a way to do this?
Tags (comma-separated)
Save Edits
Cancel