날짜수 계산 더하기 까지 Scanner sc = new Scanner(System.in);Calendar dday=Calendar.getInstance();Calendar today = Calendar.getInstance(); while(true) {System.out.println("종규가만든 디데이계산기");System.out.print("D-Day [년도] 입력 : ");int year=sc.nextInt();System.out.print("D-Day [월] 입력 : ");int month=sc.nextInt();System.out.print("D-Day [일] 입력 : ");int day=sc.nextInt(); dday.set(year,month-1,day); System.out.println("============.. 더보기 API 실습 public void main6() {//D-Day [년도] 입력 : //D-Day [월//일//오늘날짜//D-day날짜//지났다.//D-day입니다.//몇일 남았는지//hint getTimeInMillis(); 쓰기 세계 시간 기준은 1970년1월1일0시0분0초0ms이다.//우리나라 기준은 9시간 후이다.//hint getTimeInMillis(); 쓰기Scanner sc = new Scanner(System.in);Calendar dday=Calendar.getInstance();Calendar today = Calendar.getInstance(); while(true) {System.out.print("D-Day [년도] 입력 : ");int year=sc.nextInt();System.out.p.. 더보기 API String, StringBuffer StringBuilder - API -> Application Programming Interface -> 프로그래밍을 할때 특정한 기능을 처리할 수 있도록 만들어놓은 클래스나 메소드의 집합 -> 코딩을 쉽게할 수 있도록 만들어 놓은 것 import java.util.Scanner; Scanner sc = new Scanner(System.in);//Scanner형 sc을 참조하고 그 주소를 저장한거랑 똑같 다. 매개변수는 System.in을 썼다.sc.next();//문자열 입력받은것 -> Scanner 클래스로만들어진 객체에 next()라는 메소드를 호출 한모양이다.sc.nextInt(); //-> nextInt() 메소드 호출sc.nextDouble(); //-> nextDouble() 메소드 호출 이걸 보자면 구글에서 -.. 더보기 이전 1 ··· 50 51 52 53 54 55 56 ··· 70 다음