Sum of Integer in Java

class Sum
{
int sum ,num;
void getNum()
{
System.out.println("Enter the number of integers u want to add:");
num = Integer.parseInt(System.console().readLine());
}

void sumDigit()
{
System.out.println("\n Enter "+num+"integers:");
for(int i=0;i<num;i++)
{
int val = Integer.parseInt(System.console().readLine());
sum = sum + val;
}
System.out.println("\nSum of given integers:"+ sum);
}
}
class SumDemo
{
public static void main(String args[])
{
Sum m = new Sum();
m.getNum();
m.sumDigit();
}
}