使用带有 Scala 保留字的 Java 库 [英] Using a Java library with Scala reserved words

查看:28
本文介绍了使用带有 Scala 保留字的 Java 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是用 Java 编写的外部库(Selenium).其中一个函数调用具有签名 type(String, String),当我尝试从 Scala 调用它时,我不断收到编译器错误,即:

I'm using an external library written in Java (Selenium). One of the function calls has the signature type(String, String), and I keep getting compiler errors when trying to call it from Scala, that is:

selenium.type("ab","abc")

是否有解决此问题的方法?

Is there a workaround for this issue?

推荐答案

selenium.`type`("ab","abc")

这篇关于使用带有 Scala 保留字的 Java 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆