โ ๋ฐฐ์ด ์ค์ตํ๊ธฐ โ
๋ฐฐ์ด์ ์ด์ฉํ๊ธฐ์ํด์ 4๊ฐ์ง ์กฐ๊ฑด์ด ํ์ํ๋ค.
1.๋ฐฐ์ด๋ณ์ ์์ฑ(4๋ฐ์ดํธ) ex) int[ ] : ์ ์๋ฅผ ์ ์ฅํ๋ ๋ฐฐ์ด์ด๋ ๋ป
2.๋ฉ๋ชจ๋ฆฌ ํ ๋น(4๋ฐ์ดํธ * ์ํ๋ ์ ์ ๊ณต๊ฐํฌ๊ธฐ)
3.์์์ด๊ธฐํ
4.๋ฐฐ์ด ์ฌ์ฉ
์์
1
2
3
4
5
6
7
8
9
10
11
12
|
public class ArrayTest
{
public static void main(String[] args)
{
int[] nums; //๋ฐฐ์ด๋ณ์ ์์ฑ(์ฐธ์กฐํ ๋ณ์, 4๋ฐ์ดํธ)
nums = new int[2]; //๋ฉ๋ชจ๋ฆฌ ํ ๋น (4๋ฐ์ดํธ*10) new ์ฐ์ฐ์๋ ์ฐธ์กฐ๋ฅผ ๋ฐํํ๋ค.
nums[0]=ch; //์์ ์ด๊ธฐํ []์์ ๋ฒํธ๋ index๋ผ๊ณ ํ๋ค.
nums[1]=ch;
System.out.println(nums); //๋ฐฐ์ด์ฌ์ฉ
}
}
|
cs |
๋๋ฒ๊น ์ฉ์ผ๋ก ์ ์๋ฐฐ์ด์ ์์๋ฅผ ๋ฌธ์์ด๋ก ๋ณํํ์ฌ ํ๋ฉด์ ํ์ํ๊ธฐ
import java.util.Arrays;
System.out.println(Arrays.toString(nums));
Arrays import ํด์ฃผ๊ณ ์ฌ์ฉํด์ผํ๋ค. ์ค์ ์์ ๋ง์ด ์์ฐ๊ณ ๋๋ฒ๊น ์ฉ์ผ๋ก๋ง ์ด๋ค.
*๋ฌธ์๋ฐฐ์ด ๊ณต๊ฐ 10๊ฐ๋ฅผ ํ๋ณดํ๊ณ , ๋ฐฐ์ด๊ณต๊ฐ์ ๋ฌด์์ ๋ฌธ์(random)๋ฅผ ์ ๋ ฅํ๊ณ ๊ทธ๊ฒฐ๊ณผ๋ฅผ ํ๋ฉด์ ํ์ํ๋ผ.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
public class ArrayTest
{
public static void main(String[] args)
{
char[] ch = new char [10];
Random rd = new Random();
for(int i=0; i<ch.length;i++)
{
int x = rd.nextInt(26)+97;
ch[i] = (char)x;
}
System.out.println(ch);
}
}
|
cs |
ch[i] = (char)x; → ( ) ์์ ์๋ฃํ์ด ์์ผ๋ฉด ํ๋ณํ ์ฐ์ฐ์์ด๋ค.
char[] ch = new char [10]; → ์ด๊ฑด char[] ch ; ์ ch = new char[10]; ํฉ์น ๊ฒ์ด๋ค.
์ฝ์ ๊ฐ:
escwcwyvbr
*๋ฌธ์ ๋ฐฐ์ด ๊ณต๊ฐ 20๊ฐ๋ฅผ ํ๋ณดํ๊ณ ์๋ฌธ์ ๋๋ฌธ์, ์๋ฌธ์ , ์ซ์ ์ค์์ ๋ฌด์์๋ก ์ถ์ถํ์ฌ ์ ์ฅํ ํ์ ํ๋ฉด์ ํ์ํ์์ค.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
public class ArrayTest
{
public static void main(String[] args)
{
char[] chars = new char [62];
int idx = 0;
for(int i=0;i<26;i++)
{
chars[idx++] = (char)(i+65);
}
for(int i=0;i<26;i++)
{
chars[idx++] = (char)(i+97);
}
for(int i=0;i<10;i++)
{
chars[idx++] = (char)(i+48);
}
Random rd = new Random();
System.out.println(chars[rd.nextInt(62)]);
}
}
|
cs |
์ฝ์ ๊ฐ:
P
20๋ฒ ๋๋ ค์ฃผ๋ฉด๋๋ค.
*20๊ฐ์ ๋ฌธ์๋ฅผ ํ๋ฒ์ ๋ณด์ฌ์ฃผ๊ธฐ ์ํด์
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
|
public class ArrayTest
{
public static void main(String[] args)
{
char[] chars = new char [62];
int idx = 0;
for(int i=0;i<26;i++)
{
chars[idx++] = (char)(i+65);
}
for(int i=0;i<26;i++)
{
chars[idx++] = (char)(i+97);
}
for(int i=0;i<10;i++)
{
chars[idx++] = (char)(i+48);
}
Random rd = new Random();
char[] ch = new char [20];
for(int y=0;y<ch.length;y++)
{
ch[y]=chars[rd.nextInt(62)];
}
System.out.println(Arrays.toString(ch));
}
}
|
cs |
์ฝ์ ๊ฐ:
[d, m, 0, 2, A, Q, W, Y, y, z, I, e, f, 3, o, 6, j, X, f, v]
int idx = 0 → ๊ณตํต์ผ๋ก ์ฌ์ฉ๋ ์ธ๋ฑ์ค๋ฅผ ์ ์ฅํ ๋ณ์
System.out.println(ch);
์์ ๊ฐ์ด ํ๋ฆฐํธํ๋ฉด ์ฝ์์
g9u4dWrQI6aDDeWHgI2Y
์ด๋ ๊ฒ ๋์ค์ง๋ง
System.out.println(Arrays.toString(ch));
์ด์ ๊ฐ์ด ํ๋ฆฐํธํ๋ฉด ์ฝ์์
[d, m, 0, 2, A, Q, W, Y, y, z, I, e, f, 3, o, 6, j, X, f, v]
์ด์ ๊ฐ์ด ๋์จ๋ค.
๋๋ฒ๊น ํ ๋ System.out.print ๋ฅผ ๋ง์ด ์ด์ฉํ๋ค.
char[] chars = new char [62];
์ ์ฝ๋๋ฅผ ๊ทธ๋ฆผ์ผ๋ก ๋ํ๋ด ๋ณธ๋ค๋ฉด
์ ์ 62๊ฐ๋ฅผ ์ ์ฅํ ์ ์๋ ์ ๊ฐ์ฒด์ ์ฐธ์กฐ๊ฐ aBd4์ธ๋ฐ aBd4๋ผ๋ ์ฐธ์กฐ ์ ๋ณด๋ฅผ chars์ ์ ์ฅํ๋ผ
Random rd = new Random();
int t = rd.nextInt(62);
int[] nums = {1,2,3};
//๋ฐฐ์ด ๋ณ์ ์ ์ธ
//๋ฉ๋ชจ๋ฆฌ ํ ๋น { } ๊ฐ์ ์ค์๋ง ์ ์ด์ค์ผํ๋ค.
//์์ ์ด๊ธฐํ
//์ด 3๊ฐ์ง๋ฅผ ํ์ค์ ์ด๋ ๊ฒ ๋ํ๋ผ ์๋ ์๋ค.
int[] nums;
nums = new int[]{1,2,3}; // ์ด๊ฑด ๊ฐ๋ฅํ๋ค.
*ํ์๋ฒํธ, ์ด๋ฆ, ์ ํ, ์ด๋ฉ์ผ ๊ด๋ฆฌ์ฉ ํ๋ก๊ทธ๋จ ์์ฑ
๊ฐ๋ฐฐ์ด์ ์์ 5๊ฐ๋ฅผ ์ ์ฅ ๊ฐ๋ฅํ๋๋ก ํ๋ณด
ํค๋ณด๋์์ ํ ํ์์ ์ ๋ณด 4๊ฐ์ง๋ฅผ ์ ๋ ฅํ๋ฉด
๊ฐ ๋ฐฐ์ด์ ์ ์ฅ๋๋๋ก ํ๋ค. ๋ฐ๋ณตํ์ฌ 5์ธ์ ์ ๋ณด๊ฐ ๋ฐฐ์ด์ ์ ์ฅ๋๋๋ก ํ๋ค.
๊ฐ ๋ฐฐ์ด์ ์ ์ฅ๋ ๋ฐ์ดํฐ๊ฐ ๋ชฉ๋ก์ผ๋ก ์ถ๋ ฅ๋๋๋ก ํ์ํ์์ค
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
32
|
public class ArrayTest
{
public static void main(String[] args)
{
int[] num = new int [5];
String[] names = new String[5];
String[] phone = new String[5];
String[] email = new String[5];
Scanner kbd = new Scanner(System.in);
for(int i=0;i<5;i++)
{
System.out.println("๋ฒํธ: ");
num[i] = kbd.nextInt();
kbd.nextLine(); // ํค๋ณด๋ ์
๋ ฅ๋ฒํผ์์ ์ํฐ๊ฐ๊น์ง ๊ฐ์ ธ์จ๋ค.
System.out.println("์ด๋ฆ: ");
names[i] = kbd.nextLine().strip();
System.out.println("์ ํ: ");
phone[i] = kbd.nextLine().strip();
System.out.println("์ด๋ฉ์ผ: ");
email[i] = kbd.nextLine().strip();
}
for(int i =0;i<num.length;i++)
{
System.out.printf("%d\t%s\t%s\t%s\n", num[i], names[i],
phone[i], email[i]);
}
}
}
|
cs |
์ฝ์ ๊ฐ:
๋ฒํธ:
11
์ด๋ฆ:
june
์ ํ:
1234
์ด๋ฉ์ผ:
djdj@dkdkdk
๋ฒํธ:
85
์ด๋ฆ:
paul
์ ํ:
79456
์ด๋ฉ์ผ:
djfj@dlfld
๋ฒํธ:
78
์ด๋ฆ:
nan
์ ํ:
4516146
์ด๋ฉ์ผ:
dfkjkl@dolopjt
๋ฒํธ:
36
์ด๋ฆ:
may
์ ํ:
494531
์ด๋ฉ์ผ:
ojfowf@sokffk
๋ฒํธ:
86
์ด๋ฆ:
call
์ ํ:
454113
์ด๋ฉ์ผ:
fowfla@dfifas
11 june 1234 djdj@dkdkdk
85 paul 79456 djfj@dlfld
78 nan 4516146 dfkjkl@dolopjt
36 may 494531 ojfowf@sokffk
86 call 454113 fowfla@dfifas
kbd.nextLine(); // ํค๋ณด๋ ์ ๋ ฅ๋ฒํผ์์ ์ํฐ๊ฐ๊น์ง ๊ฐ์ ธ์จ๋ค.
nextInt();์ด๊ธฐ ๋๋ฌธ์ ์ซ์๋ง์ ๊ฐ์ ธ์ค๋๋ฐ ํค๋ณด๋ ์ ๋ ฅ ๋ฒํผ์ ๋จ์ enter๊น์ง ๊ฐ์ ธ์ค๊ธฐ ์ํด์ ์ด๋ค.
Method๋ฅผ ์ฌ์ฉํ์ฌ ์ ๋ ฅ ๋ฉ์๋ ์ถ๋ ฅ ๋ฉ์๋ ์์ ๋ฉ์๋ ์๋ ํ๋์ ํ๋ก๊ทธ๋จ ๋ง๋ค๊ธฐ
CRUD ์ด์ฉ (Create์์ฑ, Read์ฝ๊ธฐ, Update๊ฐฑ์ , Delete์ญ์ )
๋ฐฐ์ด, ๋ฐ๋ณต๋ฌธ, ๋ถ๊ธฐ๋ฌธ, ์ ์ด๋ฌธ์ ์ด์ฉํ์ฌ ํ์ , ์ด๋ฆ, ์ ํ, ์ด๋ฉ์ผ๋ฅผ ์์ฑํ ์ ์๊ณ , ์์ , ์ฐพ๊ธฐ, ์ญ์ ๋ ๊ฐ๋ฅํ ๊ฐ๋จํ ํ๋ก๊ทธ๋จ์ ๋ง๋์์ค.
ํ๋ก๊ทธ๋จ์ ์์ํ๋ฉด ์๋์ ๋ฉ๋ด๊ฐ ํ์๋๋๋ก ํ๋ค.
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข ๋ฃ(x)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
import java.util.Scanner;
public class MethodClassTest
{
public static void main(String[] args)
{
boolean go = true;
while(go)
{
String m = menu();
if(m.equals("a")){
addmem();
}else if(m.equals("s")){
printlist();
}else if(m.equals("u")){
updatemem();
}else if(m.equals("x")){
go = false;
}
}
System.out.println("ํ๋ก๊ทธ๋จ ์ข
๋ฃ");
}
public static String menu()
{
System.out.print("๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):");
Scanner kbd = new Scanner(System.in);
String m = kbd.nextLine().strip();
System.out.println("์
๋ ฅํ ๋ช
๋ น์:"+m);
return m;
}
static int[] num = new int [5];
static String[] names = new String[5];
static String[] phone = new String[5];
static String[] email = new String[5];
static int cnt = 0;
public static void addmem()
{
if(cnt==5)
{
System.out.println("5๋ช
์ ์์ด ์ฑ์์ก์ต๋๋ค.");
return;
}
Scanner kbd = new Scanner(System.in);
System.out.println("๋ฒํธ: ");
num[cnt] = kbd.nextInt();
kbd.nextLine();
System.out.println("์ด๋ฆ: ");
names[cnt] = kbd.nextLine().strip();
System.out.println("์ ํ: ");
phone[cnt] = kbd.nextLine().strip();
System.out.println("์ด๋ฉ์ผ: ");
email[cnt] = kbd.nextLine().strip();
cnt++;
}
public static void updatemem()
{
Scanner kbd = new Scanner(System.in);
System.out.print("์์ ํ ํ์ ๋ฒํธ");
int memnum = kbd.nextInt();
kbd.nextLine();
boolean found = false;
for(int i=0;i<cnt;i++)
{
if(memnum==num[i]){
System.out.print("์๋ก ๋ณ๊ฒฝํ ์ ํ๋ฒํธ:");
String newphone = kbd.nextLine().strip();
phone[i]= newphone;
System.out.println("์ ํ๋ฒํธ ๋ณ๊ฒฝ ์ ๊ณต");
found = true;
break;
}
}
if(!found) {
System.err.println("ํ์๋ฒํธ๊ฐ ์์ต๋๋ค");
}
}
public static void printlist()
{
for(int i =0;i<5;i++)
{
System.out.printf("%d\t%s\t%s\t%s\n", num[i], names[i], phone[i], email[i]);
}
}
}
|
cs |
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):a
์
๋ ฅํ ๋ช
๋ น์:a
๋ฒํธ:
1
์ด๋ฆ:
1
์ ํ:
1
์ด๋ฉ์ผ:
1
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):a
์
๋ ฅํ ๋ช
๋ น์:a
๋ฒํธ:
2
์ด๋ฆ:
2
์ ํ:
2
์ด๋ฉ์ผ:
2
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):s
์
๋ ฅํ ๋ช
๋ น์:s
1 1 1 1
2 2 2 2
0 null null null
0 null null null
0 null null null
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):u
์
๋ ฅํ ๋ช
๋ น์:u
์์ ํ ํ์ ๋ฒํธ3
ํ์๋ฒํธ๊ฐ ์์ต๋๋ค
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):u
์
๋ ฅํ ๋ช
๋ น์:u
์์ ํ ํ์ ๋ฒํธ2
์๋ก ๋ณ๊ฒฝํ ์ ํ๋ฒํธ:8
์ ํ๋ฒํธ ๋ณ๊ฒฝ ์ ๊ณต
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):s
์
๋ ฅํ ๋ช
๋ น์:s
1 1 1 1
2 2 8 2
0 null null null
0 null null null
0 null null null
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):x
์
๋ ฅํ ๋ช
๋ น์:x
ํ๋ก๊ทธ๋จ ์ข
๋ฃ
์ ์ฝ๋ฉ์ ์ถ๊ฐ๋ก ํ์ ์ด๋ฆ์ผ๋ก ์ ๋ณด ์ฐพ๊ธฐ ๊ธฐ๋ฅ๊ณผ ํ์๋ฒํธ๋ก ์ ๋ณด ์ญ์ ๊ธฐ๋ฅ ๋ฃ๊ธฐ
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
import java.util.Scanner;
public class MethodClassTest
{
public static void main(String[] args)
{
boolean go = true;
while(go)
{
String m = menu();
if(m.equals("a")){
addmem();
}else if(m.equals("s")){
printlist();
}else if(m.equals("u")){
updatemem();
}else if(m.equals("f")){
findByname();
}else if(m.equals("d")) {
deletemem();
}else if(m.equals("x")){
go = false;
}
}
System.out.println("ํ๋ก๊ทธ๋จ ์ข
๋ฃ");
}
public static String menu()
{
System.out.print("๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):");
Scanner kbd = new Scanner(System.in);
String m = kbd.nextLine().strip();
System.out.println("์
๋ ฅํ ๋ช
๋ น์:"+m);
return m;
}
static int[] num = new int [5];
static String[] names = new String[5];
static String[] phone = new String[5];
static String[] email = new String[5];
static int cnt = 0;
public static void addmem()
{
if(cnt==5)
{
System.out.println("5๋ช
์ ์์ด ์ฑ์์ก์ต๋๋ค.");
return;
}
Scanner kbd = new Scanner(System.in);
System.out.println("๋ฒํธ: ");
num[cnt] = kbd.nextInt();
kbd.nextLine();
System.out.println("์ด๋ฆ: ");
names[cnt] = kbd.nextLine().strip();
System.out.println("์ ํ: ");
phone[cnt] = kbd.nextLine().strip();
System.out.println("์ด๋ฉ์ผ: ");
email[cnt] = kbd.nextLine().strip();
cnt++;
}
public static void updatemem()
{
Scanner kbd = new Scanner(System.in);
System.out.print("์์ ํ ํ์ ๋ฒํธ");
int memnum = kbd.nextInt();
kbd.nextLine();
boolean found = false;
for(int i=0;i<cnt;i++)
{
if(memnum==num[i]){
System.out.print("์๋ก ๋ณ๊ฒฝํ ์ ํ๋ฒํธ:");
String newphone = kbd.nextLine().strip();
phone[i]= newphone;
System.out.println("์ ํ๋ฒํธ ๋ณ๊ฒฝ ์ ๊ณต");
found = true;
break;
}
}
if(!found) {
System.err.println("ํ์๋ฒํธ๊ฐ ์์ต๋๋ค");
}
}
public static void findByname()
{
System.out.print("์ฐพ์ ํ์์ด๋ฆ์:");
Scanner kbd = new Scanner(System.in);
String name = kbd.nextLine().strip();
boolean found = false;
for(int i=0;i<cnt;i++)
{
if(names[i].equals(name)){
System.out.printf("ํ์๋ฒํธ๋ %d\t์ด๋ฆ์ %s\t์ ํ๋ฒํธ๋ %s\t์ด๋ฉ์ผ์ %s\n",
num[i], names[i], phone[i], email[i]);
found = true;
break;
}
}
if(!found){
System.err.print("ํด๋น ํ์์ด ์์ต๋๋ค.");
}
}
public static void deletemem()
{
Scanner kbd = new Scanner(System.in);
System.out.print("์ญ์ ํ ํ์ ๋ฒํธ");
int memnum = kbd.nextInt();
kbd.nextLine();
boolean found = false;
for(int i=0;i<cnt;i++)
{
if(memnum==num[i]){
num[i] = 0;
names[i] = null;
phone[i] = null;
email[i] = null;
found = true;
System.out.println("ํ์๋ฒํธ ์ญ์ ์ฑ๊ณต");
break;
}
}
if(!found){
System.err.print("ํด๋น ํ์์ด ์์ต๋๋ค.");
}
}
public static void printlist()
{
for(int i =0;i<5;i++)
{
System.out.printf("%d\t%s\t%s\t%s\n", num[i], names[i], phone[i], email[i]);
}
}
}
|
cs |
์ฝ์ ๊ฐ:
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):a
์
๋ ฅํ ๋ช
๋ น์:a
๋ฒํธ:
1
์ด๋ฆ:
kim
์ ํ:
123456
์ด๋ฉ์ผ:
sdf@545
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):f
์
๋ ฅํ ๋ช
๋ น์:f
์ฐพ์ ํ์์ด๋ฆ์:kim
ํ์๋ฒํธ๋ 1 ์ด๋ฆ์ kim ์ ํ๋ฒํธ๋ 123456 ์ด๋ฉ์ผ์ sdf@545
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):d
์
๋ ฅํ ๋ช
๋ น์:d
์ญ์ ํ ํ์ ๋ฒํธ1
ํ์๋ฒํธ ์ญ์ ์ฑ๊ณต
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):s
์
๋ ฅํ ๋ช
๋ น์:s
0 null null null
0 null null null
0 null null null
0 null null null
0 null null null
๋ชฉ๋ก(s), ์ถ๊ฐ(a), ์์ (u), ๊ฒ์(f), ์ญ์ (d), ์ข
๋ฃ(x):
๋ชฉ๋ก์ ๋ฉค๋ฒ๋ฅผ ์ถ๊ฐํ๋ ๋ฉ์๋, ๋ฉ๋ด๋ฅผ ์ค์ ํ ๋ฉ์๋, ์ ๋ณด๋ฅผ ์์ ํ ๋ฉ์๋, ์ ๋ณด๋ฅผ ๊ฒ์ํ ๋ฉ์๋, ์ ๋ณด๋ฅผ ์ญ์ ํ ๋ฉ์๋, ๋ชฉ๋ก์ ์ถ๋ ฅํ ๋ฉ์๋๋ฅผ ๊ฐ๊ฐ ์ค์ ํ์ฌ ๋ฐฐ์ด๊ณผ , ์กฐ๊ฑด๋ฌธ๋ค์ ์ด์ฉํ์ฌ ์ฝ๋ฉํ๋ค.
public static String menu() → String ์ return type์ด๋ผ๊ณ ํ๋ค.
๋๊ธ