일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- HTML
- 클래시 로얄
- 다윈 스트리밍 서버
- gson
- bluestack
- WebtoB
- IT
- WiFi
- JEUS
- 간접 표현식
- Http Live Streaming Server
- 처비
- jQuery
- JEUS6.0
- IT 인코딩 encoding
- ubuntu
- 윈도우10
- 간접표현식
- 다윈스트리밍서버
- 붕괴3
- 하스스톤
- Sculpt Erogonomic Desktop
- 초대장
- 세븐나이츠
- Clash Royale
- 모바일게임
- Windows 10
- 세나
- 윈도우 10
- VBA
- Today
- Total
목록분류 전체보기 (98)
공책
04, 05, 06, 07, 1213, 14, 15, 20, 2122, 23, 28, 29, 30 16, 17, 18, 19, 2021, 22, 23, 24, 2526, 27, 28, 29, 30 01, 03, 05, 07, 0911, 13, 15, 17, 1921, 23, 25, 27, 29 08, 09, 10, 11, 1213, 14, 15, 24, 2526, 27, 28, 29, 30 02, 03, 06, 07, 3010, 11, 14, 15, 1819, 22, 23, 26, 27 1~ 30까지 중의 숫자를 임의로 생각해서 각 번호 그룹에 숫자가 있으면 그룹 맨 앞의 숫자를 더하고 없으면 더하지않고 다음 그룹으로 넘어가는 코드를 구현해package magic; import java.util.Scan..
package ex5; public class Ex1_for {public static void main(String[] args) {// for 문 :// 특정 명령을 원하는 만큼 반복적으로 처리할 때 사용for (int i = 0; i = 1; i--){System.out.println(i);}//1부터 10까지 반복하는 문장에서 3의 배수만 출력해 보자for(int i = 1; i
package ex4; import java.util.Scanner; public class Ex4_switch_work {public static void main(String[] args) {/* * 키보드에서 정수 두 개를 입력받는다. * 그리고 연산자를 입력 받는다. *마지막으로 입력받은 연산자를 switch 문으로 구별하여 처음의 정수 두개의 연산을 *수행하는 코드를 작성 */Scanner sc = new Scanner(System.in);int first = 0;int second = 0;int result = 0;String str = "";System.out.println("첫번째 숫자 입력 ");first = sc.nextInt();System.out.println("두번째 숫자 입력 "..
package ex4; import java.util.Scanner; public class Ex3_scanner {public static void main(String[] args) {System.out.println("정수를 입력하세요"); //키보드의 값을 입력받기 위한 scanner 클래스Scanner sc = new Scanner(System.in);switch (sc.nextInt()) {case 1:System.out.println("1번");break;case 2:System.out.println("2번");break;case 3:System.out.println("3번");break;default:break;}}}
package ex4; public class Ex2_switch {public static void main(String[] args) {String str = "미";String result = "";switch (str) {case "수":result = "90~100점";break;case "우":result = "80~90점";break;case "미":result = "70~80점";break;case "양":result = "60~70점";break;case "가":result = "50~60점";break;default:result = "점수 외";break;}System.out.println(result);}}
package ex3; public class Ex3_if {public static void main(String[] args) {// 다중 if (else if)// 여러개의 조건비교가 필요한 경우int num = 75;String str = ""; if (num >= 90) {str = "수";} else if (num >= 80) {str = "우";} else if (num >= 70) {str = "미";} else if (num >= 60) {str = "양";} else if (num < 60) {str = "가";} else {str = "성적에러";} System.out.println(str);}}
package ex3; public class Ex2_if {public static void main(String[] args) {// if ~ else 문int n = 49;String str = ""; if (++n >= 50) {str = "n은 50 이상의 수";} else {str = "n은 50 이하의 수";} System.out.println(str); //변수 age에 나이를 대입하고 나이가 30이상이면//드실만큼 드셨네요, 그렇지 않으면 더 드세요//를 출력하는 if 문을 구현한 후 //마지막으로 감사합니다. 라는 문장이 출력되도록 한다int age = 25;if(age >=30 ){str = "드실만큼 드셨네요";} else {str = "더 드세요";}System.out.printl..
package ex3; public class Ex_if {public static void main(String[] args) { // 제어문// 프로그램의 흐름을 제어하는 문장// 분기문과 반복문으로 나뉜다. // 분기문 : if, switch// 반복문 : for, while, do-while // 단순if문int n = 50;String str = ""; if (n == 50) {str = "n은 50 입니다.";}if (n != 50){str = "n은 50이 아닙니다.";}System.out.println(str); }}
package ex2; public class Ex1 {public static void main(String[] args) {//연산자//1. 최고 연산자 : . , ()//2. 증감 연산자 : ++, -- //3. 산술 연산자 : +, -, *, /, %//4. 시프트 연산자 : >>, >//5. 비교 연산자 : >, =, = 5 && myAge>=30;System.out.println(result2);int c1 = 10;int c2 = 20;boolean result3 = (c1 += 10) >20 || (c2 - 10) ==11;System.out.println("||연산결과 : " + result3);//!은 not의 뜻System.out.println("!연산결과 : " + !result3)..
public class Ex2_Casting {public static void main(String[] args) {//캐스팅//1. 프로모션 캐스팅 : 큰 자료형에 작은 자료형을 대입하는 것double d = 100.5;int n = 200;d = n;System.out.println("d : " + d);char c = 'A';long l = 100;l = c; System.out.println("l : "+l);//2. 디모션 캐스팅//작은 자료형에 큰 자료형을 대입하는 것char c2 = 'B';int n2 = c2 + 1;c2 = (char)n2;System.out.println("c2 : " + c2);float f = 5.5f;int n3 = 0;n3 = (int)f;System.out.p..