// MethodsExamples.java // Here are some examples of some Java methods which // we wrote today (2-feb-05) in "Math with Java". // Carpe diem. :-) class MethodsExamples { // public static RETURN_TYPE NAME( TYPE1 ARG1, TYPE2 ARG2, ... ) { // BODY // } public static boolean isDivisibleBy(int n, int k) { return (n % k == 0); } public static boolean isPrime(int n) { int counter; if (n < 2) return false; for (counter=2; counter