Consider the following code snippet:
int x=0; int y=50/x;
System.out.println("Division by zero");
catch(ArithmeticException e)
System.out.println("catch block");

What will be the output?

A. Error. Won't compile

B. Division by zero

C. Catch block

D. Division by zero catch block

You can do it
  1. Consider the following class definitions: class maths { student student1; } class student { String name;…
  2. Which of the following represent legal flow control statements?
  3. JSP files creates ________________
  4. If m and n are int type variables, what will be the result of the expression'm % n' when m = -14 and…
  5. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  6. In RMI before running the client program we must start RMI Registry.
  7. If you want to assign a value of 99 to the variable year, then which of the following lines can be used…
  8. A panel can not be added to another panel.
  9. Which of the following methods belong to the String class?
  10. The break statement is required in the default case of a switch selection structure.
  11. Which of the following control expressions are valid for an if statement?
  12. Throwing an exception always causes program termination.
  13. Which of the following keywords are used to control access to a class member?
  14. Consider the following class definition.Class Student extends String{}What happens when we try to compile…
  15. Which of the following will produce a value of 10 if x = 9.7?
  16. Which of the following methods can be used to draw the outline of a square?
  17. Given the codeString s = new String("abc");Which of the following calls are valid?
  18. Any method in a supper class can be over ridden in its subclass.
  19. The length of a string object 's1' can be obtained using the expression s1.length.
  20. We can add more than one class(es) at the time of compilation Java Beans.
  21. Which of the following are keywords?
  22. We can over load methods with differences only in their return type.
  23. Java always provides a default constructor to a class.
  24. Which of the following are not keywords?
  25. What is wrong in the following class definitions? abstract class print { abstract show();} class…
  26. DataInput is
  27. A variable declared inside the for loop control can not be referenced out side the loop.
  28. EJBs can be of the following type(s)None of the above
  29. Any class may be inherited by another class in the same package.
  30. The modulus operator (%) can be used only with Integer operands.