开发者

Cannot be dereferenced

开发者 https://www.devze.com 2022-12-16 17:11 出处:网络
The following code: age.equals( otherPerson.age 开发者_运维百科); Produces a compile error like:

The following code:

age.equals( otherPerson.age 开发者_运维百科);

Produces a compile error like:

Cannot be dereferenced.

How do I fix this?


it's hard to tell from your minimalistic question, but i'll guess that age is a primitive and therefore doesn't have any methods.

try using age == otherPerson.age instead.

0

精彩评论

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

关注公众号