Sum of Two Numbers in Java

class Addition {
 public static void main(String args[]) throws Exception {
  int a, b, c;
  BufferedReader br = new BufferedReader(new InputStreamReader(;
  System.out.println("Enter the two numbers to add:");
  a = Integer.parseInt(br.readLine());
  b = Integer.parseInt(br.readLine());
  c = a + b;
  System.out.println("\nSum of two numbers:" + c);

Enter the two numbers to add:
Sum of two numbers:5

Explanation : Buffered reader's input line gets the input from user by default is String is returned.
Integer.parseint method converts string to integer
addition is performed using addition operator '+' and the output is stored in variable c
System.out.println prints the output in console