일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- JEUS6.0
- 윈도우10
- HTML
- 윈도우 10
- Windows 10
- Http Live Streaming Server
- 세븐나이츠
- 간접 표현식
- 클래시 로얄
- IT 인코딩 encoding
- jQuery
- VBA
- WiFi
- 처비
- Sculpt Erogonomic Desktop
- gson
- 붕괴3
- ubuntu
- 세나
- JEUS
- Clash Royale
- bluestack
- IT
- 간접표현식
- 하스스톤
- 다윈 스트리밍 서버
- 다윈스트리밍서버
- WebtoB
- 모바일게임
- 초대장
- Today
- Total
공책
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..