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. It is perfectly legal to refer to any instance variable inside of a static method.
  2. A string object can not be modified after it is created.
  3. What does the following line of code do?TextField text=new TextField(10);
  4. Declaring a method synchronized guarantees that the deadlock cannot occur.
  5. A Java monitor must either extend thread class or implement Runnable interface.
  6. For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.
  7. Which of the following string can be used as mode string for creating a RandomAccessFile object?
  8. executeUpdate(------------) returns ___________
  9. Which of the following are the wrapper classes?
  10. A variable declared inside the for loop control can not be referenced out side the loop.
  11. We would like to make a member of a class visible in all subclasses regardless of what package they…
  12. The length of a string object 's1' can be obtained using the expression s1.length.
  13. To delete a file, we can use an instance of class file.
  14. Given the codeString s = new String("abc");Which of the following calls are valid?
  15. When we invoke repaint () for a Component, the AWT invokes the method:
  16. Which exception is thrown by the read() method of InputStream class?
  17. Which of the following methods can be used to change the size of a size() *resize()
  18. Which of the following represent legal flow control statements?
  19. Which of the following command lines options generates documentation for all classes and methods?
  20. EJBs can be of the following type(s)None of the above
  21. Consider the following code snippet: try {int x=0; int y=50/x; System.out.println("Division by zero");…
  22. It is an error if a class with one or more abstract methods is not explicitly declared abstract.
  23. When present, package must be the first no comment statement in the file.
  24. In order to connect to a database through java program we must create _______-
  25. Which of the following are not keywords?
  26. A class may be both abstract and final.
  27. What is java -g used for?
  28. An individual array element that is passed to a method and modified in that method will contain the…
  29. When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
  30. In the code below, what data types the variable x can have?