2. คำนวณ

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.

 
รหัสที่ 2-4  ตัวอย่างการคำนวณพื้นที่ของวงกลมรัศมี 4 หน่วย
public class CircleArea {
  public static void main(String[] args) {
    System.out.println("วงกลมที่มีรัศมี 4 หน่วย มีพื้นที่  " + (3.14159*4*4));
  }
}
©2009 S.Prasitjutrakul