Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ECM D2 Java Programs
- //By SaiKun
- import java.util.Scanner;
- public class DefConst {
- Scanner New_Obj = new Scanner(System.in);
- DefConst(){
- int a,b,c;
- System.out.println("Enter two values :");
- a = New_Obj.nextInt();
- b = New_Obj.nextInt();
- c = a+b;
- System.out.println("The sum is "+c);
- }
- public static void main(String[] args) {
- DefConst Obj_1 = new DefConst();
- }
- }
Add Comment
Please, Sign In to add comment