
public class Pract2a4p4_Methods {
	
	static int myMethod(int x1, int x2){ 	// signature: myMethod(int, int)
		return x1 + x2;
	}
	static double myMethod(double x){ 	// signature: myMethod(double)
		return Math.round(x*x);
	}
	static void myMethod(String s, int x){ 	// signature: myMethod(String, int)
		for (int i=0; i<x; i++) {
			System.out.print(s);
		}
	}
	public static void main(String[] args){
		
		System.out.println("My method 1: " + myMethod(1, 2));
		System.out.println("My method 2: " + myMethod(4));
		System.out.print("My method 3: ");
		myMethod("lammas", 3);
		
		/*
		 * book example - methods in a class:

class KolmArvu {
    static double korrutaKolmArvu(double a, double b, double c){
        return a*b*c;
    }
 
    static void valjasta(double a, double b, double c){
        System.out.println("Antud arvud: " + a + ", " + b + ", " + c);
    }
 
    public static void main(String[] args) {
        double x = 1.5;
        double y = 2.25;
        double z = 3;
        valjasta(x, y, z);
        System.out.println("Nende korrutis: " + korrutaKolmArvu(x, y, z));
    }
}

		 * 
		 */
	}

}
