2

I am using a third-part Java library, which defines a method named var. In Java, that is not a problem. In Scala, varis a reserved word and obj.var() gives a compilation error.

Is there a more elegant solution to this than obj.getClass().getMethod("var").invoke()?

Andrey Tyukin
  • 43,673
  • 4
  • 57
  • 93
Troy Daniels
  • 3,270
  • 2
  • 25
  • 57

0 Answers0