简体   繁体   中英

Import of custom class: several errors (e.g. java: not a statement)

I wrote a class which knows how to calculate the vector product and I want to call it in my main class. But when trying to use the class i get several Errors, that I can't explain or solve (see screenshot). Problem_screenshot

在此处输入图片说明

try是关键字,您不应使用它来命名变量/对象。

xProduct productObj = new xProduct();

You just can not do this:

xProduct try = new xProduct();

because try is a reserved keyword in java

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM