Minggu, 24 Oktober 2010

Java Method Jumlah

class Jumlah
{
static int num1 = 8;
static int num2 = 7;
static int answer = 0;
public static void main(String[] args)
{
System.out.println(jumlah());
}

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

}

0 Comments:

Post a Comment