I have just started to program in Android and I am still learning. I wanted to check if a year changes automatically when a nextMonth() method is used in case of December and January or whether I should change it with a few if statements. However, I canot display the value of that, instead I get an address. Here is my code:
TextView checkMonValue;
MonthDisplayHelper currentMonth = new MonthDisplayHelper(2012, 11);
MonthDisplayHelper nextMon = currentMonth;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
checkMonValue = (TextView)findViewById(R.id.monthValue);
checkMonValue.setText(String.valueOf(changeOfYear()));
}
public String changeOfYear(){
nextMon.nextMonth();
return nextMon + "" + nextMon.getYear();
}
And that is what get's displayed: Android.util.MonthDisplayHelper@44ee34e02013