-1 java
以下代码:
age.equals( otherPerson.age );
产生编译错误,如:
Cannot be dereferenced.
我该如何解决?
pst*_*ton 5
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.
age
try using age == otherPerson.age instead.
age == otherPerson.age
归档时间:
16 年,5 月 前
查看次数:
247 次
最近记录: