开发者

Java can't find the 'equal' method [closed]

开发者 https://www.devze.com 2023-04-09 16:59 出处:网络
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
开发者_运维百科

This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.

Closed last month.

Improve this question

I tried to check if a property was equal to a string but I keep getting this error

Code:

if (prop.getProperty("quit").equal("true")) {

}

Error:

cannot find symbol
  symbol:   method equal(java.lang.String)
  location: class java.lang.String


The method name is equals not equal.

0

精彩评论

暂无评论...
验证码 换一张
取 消