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. Which of the following keywords are used to control access to a class member?
  2. A catch can have comma-separated multiple arguments.
  3. Throwing an exception always causes program termination.
  4. Which of the following represent legal flow control statements?
  5. What is java -g used for?
  6. The programmer must explicitly create the system .in and system .out objects.
  7. The expression (x == y && a<b) is true If either x == y is true or a<b is true.
  8. It is perfectly legal to refer to any instance variable inside of a static method.
  9. The modulus operator (%) can be used only with Integer operands.
  10. Consider the following code snippet: try {int x=0; int y=50/x; System.out.println("Division by zero");…
  11. DataInput is
  12. Which javadoc tag is used to denote a comment for methods parameters?
  13. Which of the following will produce a value of 22 if x=22.9:
  14. Every method of a final in class is implicitly final.
  15. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  16. DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.
  17. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  18. What does the following line of code do?TextField text=new TextField(10);
  19. A thread can make second thread ineligible for execution by calling the suspend (-) method on second…
  20. One the features of is that an array can store many different types of values.
  21. Which of the following are not keywords?
  22. A package is a collection of
  23. Which of the following will produce a value of 10 if x = 9.7?
  24. EJBs can be of the following type(s)None of the above
  25. In a single Servlet class we can use____________
  26. When we implement an interface method, it should be declared as public.
  27. It is perfectly legal to assign a subclass object to a supper class reference.
  28. In order to connect to a database through java program we must create _______-
  29. Connection, Statement are interfaces and ResultSet is a class.
  30. The methods wait() and noify() are defined in