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");

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

You can do it
  1. We can over load methods with differences only in their return type.
  2. Which javadoc tag is used to denote a comment for methods parameters?
  3. When we implement the Runnable interface, we must define the method
  4. Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
  5. Any method in a supper class can be over ridden in its subclass.
  6. In RMI we invoke client method from remote server
  7. The name of the RMI compiler is ___________
  8. It is perfectly legal to assign a subclass object to a supper class reference.
  9. DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.
  10. A package is a collection of
  11. Declarations can appear anywhere in the body of a Java method.
  12. A Java monitor must either extend thread class or implement Runnable interface.
  13. When we implement an interface method, it should be declared as public.
  14. Which of the following represent legal flow control statements?
  15. Which of the following keywords are used to control access to a class member?
  16. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  17. A constructor must always invoke its supper class constructor in its first statement.
  18. A panel can not be added to another panel.
  19. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  20. JdbcOdbcDriver is an object of Object class
  21. forName() is a static factory method
  22. Consider the following class definition.Class Student extends String{}What happens when we try to compile…
  23. A variable declared inside the for loop control can not be referenced out side the loop.
  24. In order to connect to a database through java program we must create _______-
  25. It is perfectly legal to refer to any instance variable inside of a static method.
  26. Consider the following class definitions: class maths { student student1; } class student { String name;…
  27. Which of the following methods belong to the String class?
  28. A thread can make second thread ineligible for execution by calling the suspend (-) method on second…
  29. What does the following line of code do?TextField text=new TextField(10);
  30. class.forName(...) creates an instance of java ODBC driver