Practice More Quizzes:
Q:
Which of the following methods of the Scanner class is used to read integers from a file?
Q:
What will be the output of the following code? public static void main(String[] args) { try { int b = 0; int a = 2 / b; System.out.println(“A”); } catch (ArithmeticException e) { System.out.println(“B”); } finally { System.out.println(“C”); } }
Q:
What data type does the readLine() method in the BufferedReader class return?
Q:
What happens if BufferedReader’s readLine() method has nothing more to read?
Q:
You can have multiple “catch” blocks in a Java try-catch statement.
Q:
Which method of an Exception object prints the error message and information about which line?
Q:
What will happen during execution of a Java program if a negative int is used for an array index?
Subscribe
0 Comments
Find Questions in This Page: "CTRL+F"