How to use Java package com.example…object in Scala

后端 未结 1 432
北海茫月
北海茫月 2021-01-23 02:43

How does one refer to a Java package including object in the name such as com.example.object in Scala?

Scala treats object as a reserved word and complains.

相关标签:
1条回答
  • 2021-01-23 03:39

    Put the reserved word inside backticks, like this:

    com.example.`object`
    
    0 讨论(0)
提交回复
热议问题