1. 랜덤함수
int rand = (int)(Math.random() * 10); // 0~9 까지
String randStr = Integer.toString(rand);
tv_r.setText(randStr);
2. 오늘날짜
long now = System.currentTimeMillis();
Date date = new Date(now);
SimpleDateFormat CurDateFormat = new SimpleDateFormat("yyyy년 MM월 dd일");
String strCurDate = CurDateFormat.format(date);
Date format 형식참조 : http://wisegirl.tistory.com/82