일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Random
- 단축키
- IBatis procedure
- 자바
- 상속
- 페이징
- 25가지 효율적인 sql작성법
- 이클립스
- 가변인자
- 다형성
- 형변환
- angular2
- 상속예제
- 로또
- Login with OAuth Authentication
- 자바 야구게임
- 스프링
- 업캐스팅
- jquery
- while
- 전체
- 추상클래스
- Full text
- 전체텍스트
- full text indexing
- Validations
- 전자정부
- 다운캐스팅
- 야구게임
- Today
- Total
목록JAVA/3. Control (16)
nalaolla
package test.com; public class Test03VendingMachine2 { public static void main(String[] args) { // TODO Auto-generated method stub // 콜라500, 사이다700, 쥬스1000 final String TITLE = "[자판기 프로그램]"; // 타이틀 ment 초기화 String line = "=================================="; // 라인설정 System.out.println(TITLE); System.out.println(line); System.out.println("금액을 투입하세요"); int money = 1499; System.out.println("투입금액 : ..
package test.com; import java.util.Scanner; public class Test03VendingMachine { public static void main(String[] args) { // TODO Auto-generated method stub // 콜라500, 사이다700, 쥬스1000 final String TITLE = "[자판기 프로그램]"; //타이틀 ment 초기화 String line = "=================================="; //라인설정 String prod1Name = "콜라"; String prod2Name = "사이다"; String prod3Name = "쥬스"; int prod1Price = 500; //제품1 금액 i..
package test.com; import java.util.Scanner; public class Test03PhoneBook { public static void main(String[] args) { // TODO Auto-generated method stub int choice; while(true) { showMenu(); choice = keyboard.nextInt(); keyboard.nextLine(); switch (choice) { case 1: readData(); break; case 2: System.out.println("프로그램을 종료합니다."); return; } } } public static void showMenu() { System.out.println("선택하세..
package test.com; public class Test02Score { public static void main(String[] args) { //성적처리 프로그램 String nKor = "국어"; String nEng = "영어"; String nMath = "수학"; int korScore = 50; int engScore = 34; int mathScore = 28; int totalSum = korScore + engScore + mathScore; //double totalAvg = (double) totalSum / 3; double totalAvg = Math.round(((double) totalSum / 3)*10)/10d ; -->소수2째자리까지만 노출시키고자 한다. Str..
package test.com; public class Test02Pay { public static void main(String[] args) { // TODO Auto-generated method stub final int pay = 5000; int workHour = 9; if (workHour > 8) { System.out.println("기본금액 : " + pay * 8); System.out.println("추가수당 : " + (int) (1.5 * pay * (workHour - 8)) ); System.out.println("지급금액 : " + (int) ((pay *8) + 1.5 * pay * (workHour - 8)) ); } else { System.out.println("..
package test.com; public class Test01ifelse { public static void main(String[] args) { // 제어문 : 분기문, 반복문 // 분기문 : if, if~else, if~else if~else if..., if~else if~else // switch~case 비교대상: ~default: // 반복문 : for, while, do~while int su = 2; if (su == 0) { System.out.println("AAA"); } else if (su == 1) { System.out.println("BBB"); } else if (su == 2) { System.out.println("CCC"); } else { System.out..