일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- android ImageLoad
- 구포에서 삼량진
- spring
- 낙동강 종주
- 삼량진
- android facebook
- 부산에서 창원 자전거
- mysql
- 창원에서 부산
- C언어
- android loadImage
- elk stack
- 자바
- 구포에서 자전거
- image zoom
- 구조체
- laravel
- 안드로이드 이미지 로드
- 삼량진 자전거
- spring boot
- c언어 구조체
- httpclient post
- ImageLoad
- NetworkImageView
- workbench
- 부산에서 창원
- android imageView zoom
- 자전거
- 로드바이크
- volley
Archives
- Today
- Total
은근한
달력 예제 본문
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | import java.util.Calendar; import java.util.Scanner; public class ccal { public static void main(String[] args){ Calendar cal = Calendar.getInstance(); System.out.println("Today is "+cal.getTime()); Scanner scan = new Scanner(System.in); System.out.println("Year:"); String Year = scan.next(); System.out.println("Month:"); String Month = scan.next(); cal.set(Calendar.YEAR, Integer.valueOf(Year)); cal.set(Calendar.MONTH, Integer.valueOf(Month)-1); cal.set(Calendar.DAY_OF_MONTH, 1); int dayofweek = cal.get(Calendar.DAY_OF_WEEK); cal.set(Calendar.DAY_OF_MONTH,32); int lastday = 32 - cal.get(Calendar.DAY_OF_MONTH); int i=0; System.out.println("일\t월\t화\t수\t목\t금\t토"); for(i=0;i<dayofweek-1;i++){ System.out.print("\t"); } for(int day=1;day<=lastday;day++,i++){ if(i%7==0){ System.out.println(""); } System.out.print(day+"\t"); } } } |