Add
int getMonth(){
return month;
}
double getSalar(){
return salary;
}
methods in MonthDataPair
class
You class should be like this
public class MonthDataPair {
int month;
double salary;
public MonthDataPair(int month, double salary) {
this.month = month;
this.salary = salary;
}
public int getMonth() {
return month;
}
public void setMonth(int month) {
this.month = month;
}
public double getSalary() {
return salary;
}
public void setSalary(double salary) {
this.salary = salary;
}
}