6. แยกย่อย

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.

 
รหัสที่ 6-6  ตัวอย่างการเรียกใช้เมท็อดที่มีชื่อซ้ำ
double a = min(1.5, 3.3);
double b = min(1, 3);
double c = min(2, 2.0);

public static double min(double a, double b) { if (a < b) return a; else return b; } public static int min(int a, int b) { if (a < b) return a; else return b; }
©2009 S.Prasitjutrakul