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

You can do it
  1. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  2. DataInput is
  3. putValue(...) method takes _____________________-
  4. executeUpdate automatically updates data because___________
  5. The name of a Java program file must match the name of the class with the extension Java.
  6. A method declared as static can not access non-static class members.
  7. Give file is a file object, which of the following are legal statements to create a new file.
  8. We can over load methods with differences only in their return type.
  9. Which of the following statements are true?
  10. Consider the following code snippet: try {int x=0; int y=50/x; System.out.println("Division by zero");…
  11. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  12. A class may be both abstract and final.
  13. Java is fully object oriented programme.
  14. The default case is always required in the switch selection structure.
  15. To delete a file, we can use an instance of class file.
  16. A static class method can be invoked by simply using the name of the method alone.
  17. Servlet can have ___________
  18. Which of the following methods can be used to draw the outline of a square?
  19. What is wrong in the following class definitions? abstract class print { abstract show();} class…
  20. Any method in a supper class can be over ridden in its subclass.
  21. Objects are passed to a method by use of call-by-reference.
  22. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  23. Which of the following keywords are used to control access to a class member?
  24. executeUpdate(------------) returns ___________
  25. Which are the valid ways to create DataInputStream streams?
  26. Which of the following are not keywords?
  27. Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
  28. Submit button always fires doPost(...)
  29. For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.
  30. We can add more than one class(es) at the time of compilation Java Beans.