3번, Calendar 클래스를 사용해 연월일을 비롯한 날짜 정보를 출력하려고 한다. 다음 프로그램을 완성하라.
정답 package Section08_03; import java.util.Calendar; public class CalenderTest { public static void main(String[] args) { String[] weekName = { "일", "월", "화", "수", "목", "금", "토" }; String[] noonName = { "오전", "오후" }; Calendar c = Calendar.getInstance(); int year = c.get(Calendar.YEAR); int month = c.get(Calendar.MONTH); int day = c.get(Calendar.DAY_OF_MONTH); String week = weekName[c.get(Calendar.DAY_OF_WEEK) - 1 ]; String noon = noon...
원문 링크 : 쉽게 배우는 자바 프로그래밍 8장 프로그래밍 문제 - 3번