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. Objects are passed to a method by use of call-by-reference.
  2. In the code below, what data types the variable x can have?
  3. It is perfectly legal to refer to any instance variable inside of a static method.
  4. All the bitwise operators have the same level of precedence in Java.
  5. The break statement is required in the default case of a switch selection structure.
  6. Which of the following methods can be used to remove a component from the display?
  7. An individual array element that is passed to a method and modified in that method will contain the…
  8. A class may be both abstract and final.
  9. It is an error to catch the same type of exception in two different catch blocks associated with a particular…
  10. A final class may not have any abstract method.
  11. Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
  12. The modulus operator (%) can be used only with Integer operands.
  13. When we implement an interface method, it should be declared as public.
  14. The programmer must explicitly create the system .in and system .out objects.
  15. Which of the following keywords are used to control access to a class member?
  16. One the features of is that an array can store many different types of values.
  17. A thread can make second thread ineligible for execution by calling the suspend (-) method on second…
  18. In order to connect to a database through java program we must create _______-
  19. Every call to wait has a corresponding call to notify that will eventually end the wafting.
  20. The methods wait() and noify() are defined in
  21. When the string objects are compared with ==, the result is true If the strings contain the same values.
  22. Which of the following represent legal flow control statements?
  23. If you want to assign a value of 99 to the variable year, then which of the following lines can be used…
  24. When we invoke repaint () for a Component, the AWT invokes the method:
  25. class.forName(...) creates an instance of java ODBC driver
  26. forName() is a static factory method
  27. Any method in a supper class can be over ridden in its subclass.
  28. Give file is a file object, which of the following are legal statements to create a new file.
  29. Consider the following class definitions: class maths { student student1; } class student { String name;…
  30. It is an error to have a method with the same signature in both the super class and its subclass.