Timo Westkämper
Timo Westkämper

Reputation: 22190

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

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.

Upvotes: 3

Views: 643

Answers (1)

Haakon
Haakon

Reputation: 1741

Put the reserved word inside backticks, like this:

com.example.`object`

Upvotes: 9

Related Questions