JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
You need to write a divider program which will operate with integers,
The program you are given should take two integers as input and execute the division, but we need to handle two exceptions:
1. the divider shouldn't be zero
2. both inputs should be integers.
Complete the program to handle them. For the first exception, the program should output "Еrror: division by zero"; and for the second one, "Error: wrong value type".
Use ArithmeticException for first exception and InputMismatchException for the second one.
Sample Input
1
b
Sample Output
Error: wrong value type
*/
import java.util.Scanner;
import java.util.InputMismatchException;
public class MultipleExcepyion
{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run