class Football {
private String mfootballerName;
private int mkiitNumber;
private String mfootballTeam;
public String getfootballerName() {
return mfootballerName;
}
public int kitNumber() {
return mKitNumber;
}
public String footballTeam() {
return mfootballTeam;
}
}
Asked
Active
Viewed 29 times
-2
-
`mkiitNumber` is not the same as `mKitNumber` – Jim Garrison Nov 25 '17 at 18:04
-
Typo - your member is called `mkiitNumber`. Flagging as just a typographical error. – hnefatl Nov 25 '17 at 18:04
-
public int kitNumber() { return mKiitNumber; } – AYUSH ARYA Nov 25 '17 at 18:43
-
I recommend to use an IDE like Eclipse with code completion feature. You type e.g. `mkit` and let the IDE append the rest or show you that there is no such symbol beginning with `mkit`. That virtually eliminates typos. And has many more advantages. – Ralf Kleberhoff Nov 25 '17 at 20:10
1 Answers
1
Simple typo, you've mistyped your private int mkiitNumber
as mKitNumber
(or the other way around, depending on which you actually meant).
Here's the corrected code:
class Football {
private String mfootballerName;
private int mkitNumber;
private String mfootballTeam;
public String getfootballerName() {
return mfootballerName;
}
public int kitNumber() {
return mKitNumber;
}
public String footballTeam() {
return mfootballTeam;
}
}

hnefatl
- 5,860
- 2
- 27
- 49

Trevor Sears
- 459
- 8
- 24