You are on page 1of 2

Name: Nikhil Gupta

Roll No. 2000290100092

CSE VI-B

WT LAB 1
import java.io.*;

import java.util.*;

class Hello{

public static void main(String arg[]){

System.out.println("Hello World");

class assg{

public static void main(String arg[])throws Exception{

int a=15,b=51;

System.out.println("Sum of numbers is :"+(a+b));

class comm{

public static void main(String arg[])throws Exception{

int a,b;

a=Integer.parseInt(arg[0]);

b=Integer.parseInt(arg[1]);

System.out.println("Sum of numbers is :"+(a+b));

}
class Buff{

public static void main(String arg[]) throws Exception{

InputStreamReader inp=new InputStreamReader(System.in);

BufferedReader br=new BufferedReader(inp);

int a,b;

System.out.println("Enter 1st intger :");

a=Integer.parseInt(br.readLine());

System.out.println("Enter 2nd integer :");

b=Integer.parseInt(br.readLine());

System.out.println("Sum of numbers is :"+(a+b));

class Scann{

public static void main(String arg[]) throws Exception{

Scanner inp=new Scanner(System.in);

int a,b;

System.out.println("Enter 1st integer :");

a=Integer.parseInt(inp.nextLine());

System.out.println("Enter 2nd Integer :");

b=Integer.parseInt(inp.nextLine());

System.out.println("Sum of numbers is :"+(a+b));

You might also like