Minggu, 24 Oktober 2010

MethodParameter

class MethodParameter
{
/*
static int num1 =3;
static int num2 =5;
*/
static int answer =0;

public static void main(String[] args)
{
int result = yes(4,7);
System.out.println(result);
}

private static int yes(int num1,int num2)
{
answer = num1+num2;
return answer;
}
};

0 Comments:

Post a Comment