4段階目(EmployeeDataクラスの型を作ろう)

This commit is contained in:
s-sakiyama
2026-09-14 16:37:11 +09:00
parent 769fb977ca
commit 3e82879f22
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
public class EmployeeData {
String idEmployee;
String nmEmployee;
String knEmployee;
String mailAddress;
String password;
String idDepartment;
void showInfo() {
System.out.println(this.idEmployee + "\t" + this.nmEmployee
+ "\t" + this.knEmployee + "\t" + this.mailAddress
+ "\t" + this.password + "\t" + this.idDepartment);
}
}

19
em-oop/src/Main.java Normal file
View File

@@ -0,0 +1,19 @@
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
EmployeeData employee = new EmployeeData();
employee.idEmployee = "10000";
employee.nmEmployee = "山田龍也";
employee.knEmployee = "ヤマダタツヤ";
employee.mailAddress = "yamada@hoge.jp";
employee.password = "aaa";
employee.idDepartment = "10";
employee.showInfo();
}
}