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. For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.
  2. Which of the following methods belong to the String class?
  3. It is an error to catch the same type of exception in two different catch blocks associated with a particular…
  4. putValue(...) method takes _____________________-
  5. Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
  6. Declaring a method synchronized guarantees that the deadlock cannot occur.
  7. The modulus operator (%) can be used only with Integer operands.
  8. In RMI we invoke client method from remote server
  9. The default case is always required in the switch selection structure.
  10. Which of the following statements are valid array declarations?
  11. Which exception is thrown by the read() method of InputStream class?
  12. One the features of is that an array can store many different types of values.
  13. An individual array element that is passed to a method and modified in that method will contain the…
  14. Which of the following are the wrapper classes?
  15. A package is a collection of
  16. class.forName(...) creates an instance of java ODBC driver
  17. Servlet has ___________
  18. Which of the following statements are true?
  19. A class may be both abstract and final.
  20. Which of the following statements are true?
  21. Consider the following class definitions: class maths { student student1; } class student { String name;…
  22. Which of the following will produce a value of 22 if x=22.9:
  23. The methods wait() and noify() are defined in
  24. Members of a class specified as private are accessible only to the methods of the class.
  25. In RMI before running the client program we must start RMI Registry.
  26. When we invoke repaint () for a Component, the AWT invokes the method:
  27. It is perfectly legal to refer to any instance variable inside of a static method.
  28. The name of the RMI compiler is ___________
  29. A thread can make second thread ineligible for execution by calling the suspend (-) method on second…
  30. The name of a Java program file must match the name of the class with the extension Java.