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

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

问题描述

我使用的是用Java编写的外部库( Selenium )。其中一个函数调用具有签名类型(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天全站免登陆