import java.io.*; public class SumExample{ public int x; public int y; public static void main(String args[]){ try { SumExample sum1= new SumExample(); int sum; BufferedReader object= new BufferedReader (new InputStreamReader(System.in)); System.out.println("Enter number:"); System.out.print("Enter number x:="+ ""); sum1.x=Integer.parseInt(object.readLine()); System.out.print("Enter number y:="+ ""); sum1.y=Integer.parseInt(object.readLine()); sum= sum1.x+sum1.y; System.out.println("Sum is:"+ sum); } catch(Exception e){} } }