//**************************Start***************************
import java.util.*;
/**
*
* @author HP
*/
public class try_catch {
public static void main(String args[]) {
int i, j;
Scanner sc = new Scanner(System.in);
System.out.println("Enter any 2 no.");
i = sc.nextInt();
j = sc.nextInt();
try {
int result = i / j;
System.out.println("Result= " + result);
}
catch (Exception es) {
System.err.println(es.getMessage());
}
}
}
//**************************End***************************
import java.util.*;
/**
*
* @author HP
*/
public class try_catch {
public static void main(String args[]) {
int i, j;
Scanner sc = new Scanner(System.in);
System.out.println("Enter any 2 no.");
i = sc.nextInt();
j = sc.nextInt();
try {
int result = i / j;
System.out.println("Result= " + result);
}
catch (Exception es) {
System.err.println(es.getMessage());
}
}
}
//**************************End***************************
No comments:
Post a Comment
Welcome, happy learning