Stept 9 (Today All Done)
This commit is contained in:
@@ -13,8 +13,13 @@ public class EmployeeData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setIdEmployee(String idEmployee) {
|
public void setIdEmployee(String idEmployee) {
|
||||||
|
// null ဖြစ်နေသလား (သို့မဟုတ်) ရှေ့နောက် Space များကို ဖယ်ရှားလိုက်လျှင် စာသားအလွတ် ဖြစ်သွားသလား စစ်ဆေးခြင်း
|
||||||
|
if (idEmployee == null || idEmployee.trim().isEmpty()) {
|
||||||
|
System.out.println("社員Idが空のため設定できませんでした");
|
||||||
|
} else {
|
||||||
this.idEmployee = idEmployee;
|
this.idEmployee = idEmployee;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String getNmEmployee() {
|
public String getNmEmployee() {
|
||||||
return nmEmployee;
|
return nmEmployee;
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public class Main {
|
|||||||
// }
|
// }
|
||||||
System.out.println("--- 空文字のテスト ---");
|
System.out.println("--- 空文字のテスト ---");
|
||||||
employee1.setNmEmployee(""); // စာသားအလွတ်
|
employee1.setNmEmployee(""); // စာသားအလွတ်
|
||||||
employee1.setNmEmployee(" "); // Space သီးသန့်
|
employee1.setIdEmployee(" "); // Space သီးသန့်
|
||||||
employee1.setNmEmployee(null); // null တန်ဖိုး
|
employee1.setNmEmployee(null); // null တန်ဖိုး
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user