-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployeeTest.java
More file actions
38 lines (27 loc) · 1.01 KB
/
Copy pathEmployeeTest.java
File metadata and controls
38 lines (27 loc) · 1.01 KB
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
package com.test0215;
import java.util.Scanner;
public class EmployeeTest {
public static void main(String[] args) {
Employee[] employeeInfo = new Employee[3];
employeeInfo[0] = new Employee("A1892", "이진선", "AI개발부", "사원", 3500);
employeeInfo[1] = new Employee("B8007", "심용권", "Web개발부", "부장", 7000);
employeeInfo[2] = new Employee("F5691", "신지영", "총괄개발부", "전무", 9000);
/*
* = {
* new Employee("A1892", "이진선", "AI개발부", "사원", 3500)
* new Employee("B8007", "심용권", "Web개발부", "부장", 7000)
* new Employee("F5691", "신지영", "총괄개발부", "전무", 9000)
* };
*/
System.out.print("사원번호 > ");
Scanner sc = new Scanner(System.in);
String input = sc.next();
System.out.println("=======================");
for (Employee s : employeeInfo) {
if (s.getNo().equals(input)) {
System.out.println(s.toString());
}
}
sc.close();
}
}