In activity no 1 have like this.
myIntent.putExtra("currentyear", syear);
myIntent.putExtra("currentmonth",smonth);
myIntent.putExtra("currentday",sday);
myIntent.putExtras(extras);
And in the activty no 2
Always have the null check placed when reading from the extras.
have like this.
Bundle extras = getIntent().getExtras();
if(extras!=null){
String dyear = extras.getString("currentyear");
String dmonth = extras.getString("currentmonth");
String dday = extras.getString("currentday");
}
TextView textView = new TextView(this);
textView.setTextSize(40);
textView.setText(dday);
textView.setText(dmonth);
textView.setText(dyear);
setContentView(textView);