Home

Consider the following code snippet:
try 
{
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

Please do not use chat terms. Example: avoid using "grt" instead of "great".

You can do it
  1. The check box group class is a subclass of the component class.
  2. The length of a string object 's1' can be obtained using the expression s1.length.
  3. Throwing an exception always causes program termination.
  4. Which of the following represent legal flow control statements?
  5. Which of the following will produce a value of 22 if x=22.9:
  6. Members of a class specified as private are accessible only to the methods of the class.
  7. Which of the following statements are valid array declarations?
  8. The modulus operator (%) can be used only with Integer operands.
  9. In RMI we invoke client method from remote server
  10. We would like to make a member of a class visible in all subclasses regardless of what package they…
  11. In order to connect to a database through java program we must create _______-
  12. Which of the following classes are available in the java.lang package?
  13. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  14. A thread can make second thread ineligible for execution by calling the suspend (-) method on second…
  15. In the code below, what data types the variable x can have?
  16. Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
  17. JSP files creates ________________
  18. A final class may not have any abstract method.
  19. Consider the following class definitions: class maths { student student1; } class student { String name;…
  20. The break statement is required in the default case of a switch selection structure.
  21. Servlet has ___________
  22. Which of the following methods can be used to change the size of a size() *resize()
  23. The expression (x == y && a<b) is true If either x == y is true or a<b is true.
  24. Give file is a file object, which of the following are legal statements to create a new file.
  25. It is perfectly legal to assign a subclass object to a supper class reference.
  26. A method declared as static can not access non-static class members.
  27. Which javadoc tag is used to denote a comment for methods parameters?
  28. executeUpdate(------------) returns ___________
  29. With javadoc, which of the following denotes a javadoc comment?
  30. When we implement the Runnable interface, we must define the method