Home

Which are the valid ways to create DataInputStream streams?

A. new DataInputStream(new File("in.dat"));

B. new DataInputStream(new FileInputStream("in.dat"));

C. new DataInputStream("in.dat");

D. new DataInputStream("in.data","r");

You can do it
  1. Servlet has ___________
  2. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  3. A constructor must always invoke its supper class constructor in its first statement.
  4. The modulus operator (%) can be used only with Integer operands.
  5. Give file is a file object, which of the following are legal statements to create a new file.
  6. Java always provides a default constructor to a class.
  7. Which key word can protect a class in package from accessibility by the classes outside the package?
  8. putValue(...) method takes _____________________-
  9. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  10. Which of the following methods belong to the String class?
  11. What does the following line of code do?TextField text=new TextField(10);
  12. A catch can have comma-separated multiple arguments.
  13. In a single Servlet class we can use____________
  14. Every method of a final in class is implicitly final.
  15. We would like to make a member of a class visible in all subclasses regardless of what package they…
  16. Frames and applets cannot be used together in the same program.
  17. Any method in a supper class can be over ridden in its subclass.
  18. Declaring a method synchronized guarantees that the deadlock cannot occur.
  19. Consider the following class definition.Class Student extends String{}What happens when we try to compile…
  20. A variable declared inside the for loop control can not be referenced out side the loop.
  21. The check box group class is a subclass of the component class.
  22. The length of a string object 's1' can be obtained using the expression s1.length.
  23. Declarations can appear anywhere in the body of a Java method.
  24. Which are the valid ways to create DataInputStream streams?
  25. Given the codeString s = new String("abc");Which of the following calls are valid?
  26. Throwing an exception always causes program termination.
  27. Which of the following command lines options generates documentation for all classes and methods?
  28. Which of the following statements are valid array declarations?
  29. The expression (x == y && a<b) is true If either x == y is true or a<b is true.
  30. To delete a file, we can use an instance of class file.