10. สิ่งผิดปกติ

The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

 
รหัสที่ 10-17  การใช้ assert เพื่อตรวจสอบค่าของพารามิเตอร์
  private void heatReactor(int temp) {
    assert (200 <= temp && temp <= 1000) : temp;
    reactor.setHeat(temp);
    ...
  }
©2009 S.Prasitjutrakul