Professional Documents
Culture Documents
10
AIM:Write a program to create a customized exception and also make use of all the five
exception keywords.
SOURCE CODE:
import java.util.Scanner;
super(str);
class Main
else {
System.out.println("welcome to vote");
}
public static void main(String args[])
int a;
a = s.nextInt();
try
validate(a);
finally
System.out.println("End of code!\n");
}
OUTPUT:
Aditya Khandelwal
09
IT-A
PROGRAM No. 9
SOURCE CODE:
import java.util.Scanner;
class Main
int m, n, p, q, sum = 0, c, d, k;
m = in.nextInt();
n = in.nextInt();
first[c][d] = in.nextInt();
q = in.nextInt();
if (n != p)
else
second[c][d] = in.nextInt();
}
multiply[c][d] = sum;
sum = 0;
System.out.print(multiply[c][d]+"\t");
System.out.println("\n");
}
OUTPUT:
Aditya Khandelwal
09
IT-A