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 string can be used as mode string for creating a RandomAccessFile object?
  2. If m and n are int type variables, what will be the result of the expression'm % n' when m = -14 and…
  3. A method declared as static can not access non-static class members.
  4. All methods in an abstract class must be declared abstract.
  5. JdbcOdbcDriver is an object of Object class
  6. Which javadoc tag is used to denote a comment for methods parameters?
  7. DataInput is
  8. The name of the RMI compiler is ___________
  9. The setBackground() method is part of the class
  10. With javadoc, which of the following denotes a javadoc comment?
  11. A constructor must always invoke its supper class constructor in its first statement.
  12. The expression (x == y && a<b) is true If either x == y is true or a<b is true.
  13. Which of the following methods belong to the String class?
  14. A panel can not be added to another panel.
  15. The default case is always required in the switch selection structure.
  16. Consider the following code snippet: try {int x=0; int y=50/x; System.out.println("Division by zero");…
  17. Which of the following methods can be used to change the size of a size() *resize()
  18. If you want to assign a value of 99 to the variable year, then which of the following lines can be used…
  19. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  20. It is an error if a class with one or more abstract methods is not explicitly declared abstract.
  21. The use of protected keyword to a member in a class will restrict its visibility as follows:
  22. forName() is a static factory method
  23. It is an error to catch the same type of exception in two different catch blocks associated with a particular…
  24. Give file is a file object, which of the following are legal statements to create a new file.
  25. The programmer must explicitly create the system .in and system .out objects.
  26. When we invoke repaint () for a Component, the AWT invokes the method:
  27. One the features of is that an array can store many different types of values.
  28. Which key word can protect a class in package from accessibility by the classes outside the package?
  29. JSP files creates ________________
  30. Which of the following statements are true?