Home

Give file is a file object, which of the following are legal statements to create a new file.

A. file.create();

B. FileOutputStream fos=new FileOutputStream(file);

C. FileInputStream fis=new FileInputStream(file);

D. all of the above

You can do it
  1. Which of the following command lines options generates documentation for all classes and methods?
  2. We can over load methods with differences only in their return type.
  3. Which of the following will produce a value of 22 if x=22.9:
  4. In order to connect to a database through java program we must create _______-
  5. Which of the following statements are true?
  6. Which javadoc tag is used to denote a comment for methods parameters?
  7. When we invoke repaint () for a Component, the AWT invokes the method:
  8. Every method of a final in class is implicitly final.
  9. forName() is a static factory method
  10. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  11. The concept of multiple inheritance is implemented in Java by
  12. An EJB is a server-side component that encapsulates the business logic of an application
  13. Which of the following statements are valid array declarations?
  14. A JSP file can be stored_________________
  15. All the bitwise operators have the same level of precedence in Java.
  16. Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
  17. Which of the following are keywords?
  18. executeUpdate automatically updates data because___________
  19. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  20. The setBackground() method is part of the class
  21. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  22. The default case is always required in the switch selection structure.
  23. One the features of is that an array can store many different types of values.
  24. Which of the following methods belong to the String class?
  25. The check box group class is a subclass of the component class.
  26. Which of the following control expressions are valid for an if statement?
  27. Which of the following are the wrapper classes?
  28. Objects are passed to a method by use of call-by-reference.
  29. Which of the following methods can be used to draw the outline of a square?
  30. putValue(...) method takes _____________________-