开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜