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 ArgConst {
- ArgConst(int x,int y){
- int z = x+y;
- System.out.println("The output is "+z);
- }
- public static void main(String[] args) {
- Scanner Obj_1 = new Scanner(System.in);
- int a,b;
- System.out.println("Enter two values :");
- a = Obj_1.nextInt();
- b = Obj_1.nextInt();
- ArgConst Obj_2 = new ArgConst(a,b);
- }
- }
Add Comment
Please, Sign In to add comment