일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 업캐스팅
- 야구게임
- 전체
- jquery
- 단축키
- IBatis procedure
- 전체텍스트
- Random
- 자바 야구게임
- 다운캐스팅
- 페이징
- full text indexing
- 다형성
- 추상클래스
- 형변환
- 이클립스
- 25가지 효율적인 sql작성법
- 상속
- Full text
- 로또
- 자바
- angular2
- 스프링
- 전자정부
- 가변인자
- while
- Login with OAuth Authentication
- Validations
- 상속예제
- Today
- Total
목록JAVA/3. Control (16)
nalaolla
package test.com; public class Test11Score { public static void main(String[] args) { // 성적처리 프로그램 String nKor = "국어"; String nEng = "영어"; String nMath = "수학"; int korScore = 50; int engScore = 64; int mathScore = 68; int totalSum = korScore + engScore + mathScore; // double totalAvg = (double) totalSum / 3; double totalAvg = Math.round(((double) totalSum / 3) * 10) / 10d; String inputComment = ..
package test.com; public class Test10for { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("for"); //반복문 : for >>> 숫자나 길이만큼 반복하고자 할때. String name = "hellojava"; for (int i = 0; i 0; i--) { System.out.println("이름을 입력하세요 : " + i); } for (int i = 0; i
package test.com; public class Test09Game { public static void main(String[] args) { // TODO Auto-generated method stub //1. 로그인 //1_1. 아이디/패스워드 검증 (id : danielkim, pwd : 1234) // >> 맞으면 게임진행, 틀리면 잘못입력 System.out.println("아이디를 입력하세요:"); String id = "danielkim"; System.out.println("입력한 아이디 : " + id); System.out.println("비밀번호를 입력하세요:"); String password = "1234"; System.out.println("입력한 비밀번호 : " + ..
package test.com; public class Test08VendingMachine { 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 = 400; System.out.printl..
package test.com; public class Test07Score { public static void main(String[] args) { //성적처리 프로그램 String nKor = "국어"; String nEng = "영어"; String nMath = "수학"; int korScore = 80; int engScore = 54; int mathScore = 98; int totalSum = korScore + engScore + mathScore; //double totalAvg = (double) totalSum / 3; double totalAvg = Math.round(((double) totalSum / 3)*10)/10d ; String inputComment = " 점수를..
package test.com; public class Test06SwitchCaseBreak2 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("switch ~ case ~ default ~ break;"); String name = "daniel"; switch (name) { case "daniel": System.out.println("AAA"); break; case "daniel2": System.out.println("AAA2"); break; default: System.out.println("default"); break; } } }
package test.com; public class Test06SwitchCaseBreak { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("switch ~ case ~ default ~ break;"); // 정수비교 int x = 100; switch (x) { case 100 : System.out.println("A++"); boolean bool = false; if(bool = x%2 == 0) { System.out.println("짝수"); } System.out.println(bool); break; //if문의 블럭을 제외한 가장 가까운 블럭의 끝을 빠져나가라..
package test.com; public class Test05Block { public static void main(String[] args) { // TODO Auto-generated method stub //자바는 블럭단위 처리 int x = 100; if(true) { System.out.println("block" + x); int y = 50; System.out.println(y); } //System.out.println(y); //하위 로컬 블럭상의 변수접근불가 } }
package test.com; import java.util.Scanner; public class Test04Game2 { final static String SID = "aa"; final static String SPWD = "bb"; final static String TITLE = "[GAME PROGRAM]"; final static String LINE = "=============================="; static int loginResult = 0; public static void main(String[] args) { // TODO Auto-generated method stub //1. 게임실행 //2. 로그인 (id = aa, pwd = bb) //3. 정상로그인 >..
package test.com; public class Test04Game { public static void main(String[] args) { // TODO Auto-generated method stub final String TITLE = "[game program]"; // 타이틀 ment 초기화 String line = "=================================="; // 라인설정 //1. 로그인 //1_1. 아이디/패스워드 검증 (id : danielkim, pwd : 1234) // >> 맞으면 게임진행, 틀리면 잘못입력 //2. 맞으면 게임진행 //2_1. 캐릭터 선택 (1.인간 2.괴물 3.로봇) //인간 - 공격력 5, 방어력 6 //괴물 - 공격력 8, 방어..