How to access Scala var and val fields from Java alvin October 15, 2014 - 7:35pm

I just ran into one thing I wish I had included in the Scala Cookbook that I didn’t include: How to access a val or var field in a Scala object from your Java code.

In short, if you have a field named appName defined in a Scala object, like this: