试题详情
单项选择题 20. public float getSalary(Employee e) {  21. assert validEmployee(e);  22. float sal = lookupSalary(e);  23. assert (sal>0);  24. return sal;  25. }  26. private int getAge(Employee e) {  27. assert validEmployee(e);  28. int age = lookupAge(e);  29. assert (age>0);  30. return age;  31. }  Which line is a violation of appropriate use of the assertion mechanism?()  

A、 line 21

B、 line 23

C、 line 27

D、 line 29

  • A
  • 关注下方微信公众号,在线模考后查看

热门试题