MapleStory Finger Point

๐ŸŸค JAVA/๐Ÿ“š๋ช…ํ’ˆ JAVA_ESSENTIAL

[๋ช…ํ’ˆ JAVA ESSENTIAL] CH2 ์—ฐ์Šต๋ฌธ์ œ&์ด๋ก ๋ฌธ์ œ

HYEJU01 2021. 9. 23. 22:10
"๊ฐœ์ •ํŒ: ๋ช…ํ’ˆ JAVAESSENTIAL(ํ™ฉ๊ธฐํƒœ)"๊ต์žฌ์— ์ˆ˜๋ก๋œ ๋ฌธ์ œ๋“ค์„ ํ’€์–ด์„œ ์˜ฌ๋ฆฝ๋‹ˆ๋‹ค.
๋ฌธ์ œ์˜ ๋ฒˆํ˜ธ๋งŒ ํ‘œ๊ธฐํ•˜๊ณ  ๋‹ต์•ˆ๋งŒ ์ ๋Š” ํ˜•ํƒœ๋กœ ์—…๋กœ๋“œ ํ•˜๊ณ ์žˆ์Šต๋‹ˆ๋‹ค.
๊ฐœ์ธ ํ’€์ด์ด๋ฏ€๋กœ ์˜ค๋‹ต์ด ์žˆ์„ ์ˆ˜ ์žˆ์œผ๋ฉฐ ์˜ค๋‹ต ๋ฐœ๊ฒฌ ์‹œ ๋Œ“๊ธ€ ๋‚จ๊ฒจ์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค๐Ÿ˜Š
-
#์ด ํ‘œ์‹œ๋œ ๊ฑด ์•„์ง ํ’€์ง€ ๋ชปํ•œ ๋ฌธ์ œ or ํ—ท๊ฐˆ๋ฆฌ๋Š” ๋ฌธ์ œ์ž…๋‹ˆ๋‹ค!
์ถ”ํ›„์— ๋‹ค์‹œ ํ’€์–ด์„œ ์˜ฌ๋ฆด ์˜ˆ์ •์ด์—์š”!

-ujeyhx-

โœ…Check Time 52p

1) 6๋ฒˆ

 

2) ๋งจ์•ž public ๋ถ™์—ฌ์•ผํ•จ

 

3)

public class Hi {
  public static void main(String[] args) {
    System.out.println("Hi");
  }
}

 

 

 

โœ…Check Time 62p

1) 1๋ฒˆ byte  ( Double x, double o / bool x , boolean o / Stirng -> ํด๋ž˜์Šค์ž„ ๊ธฐ๋ณธํƒ€์ž…์•„๋‹˜)

 

2)

public class Hi {
  public static void main(String[] args) {
    int YEAR = 365, MONTH = 30, WEEK = 7 ;
  }
}

 

 

#3) "a" (Stirng ํ˜•)

 

 

โœ…Check Time 75p

1)

z = 6 + 9 - 5 + 0

z = 10

 

2) 4

 

3) 4

 

 

๐Ÿ”Ž์ด๋ก ๋ฌธ์ œ

1)

public class xx {
}

 

2) %j / 1var

 

 

3) 

int age;
float f = 0.25;
double d = age + f;
char c = 'a';
String name = "ujeyhx"

 

4)

#

 

5)

a >= b
c < a < b
a + 3 != 10
10 < a = b

 

6) 4๋ฒˆ (์ •์ˆ˜ ๋ฆฌํ„ฐ๋Ÿด๋งŒ ๊ฐ€๋Šฅํ•จ)

 

7)

1)
SampleProgram.java

2)
public class SampleProgram{
	public static void main (String[] args) { //๋ฉ”์ธ์ด ๋น ์ ธ์žˆ์Œ
          int i = 20;
          int j = 30;
          System.out.println(i+j);
	}
}

 

8)

1)
์˜ต์…˜1
์˜ต์…˜2
์˜ต์…˜3
2)
์˜ต์…˜2
์˜ต์…˜3
3)
์˜ต์…˜3
4)
ํ•ด๋‹น์—†์Œ

 

9)

i = (j%2 == 0) ? 10 : 20;

 

10)

switch (i) {
  case 1:
      System.out.println("!");
  case 2:
      System.out.println("@");
  case 3:
      System.out.println("#");
  default:
      System.out.println("*");	
}