开发者

Cannot be dereferenced

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜