announcements‎ > ‎

2015-09-21

posted Sep 22, 2015, 8:45 AM by Samuel Konstantinovich   [ updated Sep 22, 2015, 8:45 AM ]
Code from class:

public class FunctionDemo{
   
    public static int bar(int x){
return 2 * x + 1;
    }

    public static void main(String[]args){
System.out.println("GG:"+ bar(2) + bar(bar(2)) );
foo();
foo(10,"Awooooga");
foo(9.2,"Awooooga");
    }
    public static void foo(){
System.out.println("Heya@@@@!!!!!");
    }
        public static void foo(int a, String s){
    System.out.println(s+a);//number last
    }
    public static void foo(double x, String s){
System.out.println(x+s);//number first
    }

}


Comments