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

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

You can do it
  1. In the code below, what data types the variable x can have?
  2. Declaring a method synchronized guarantees that the deadlock cannot occur.
  3. The methods wait() and noify() are defined in
  4. When the string objects are compared with ==, the result is true If the strings contain the same values.
  5. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  6. Which of the following methods can be used to remove a component from the display?
  7. A static class method can be invoked by simply using the name of the method alone.
  8. Which of the following command lines options generates documentation for all classes and methods?
  9. A Java monitor must either extend thread class or implement Runnable interface.
  10. It is perfectly legal to assign a subclass object to a supper class reference.
  11. A package is a collection of
  12. A class may be both abstract and final.
  13. If m and n are int type variables, what will be the result of the expression'm % n' when m = -14 and…
  14. To delete a file, we can use an instance of class file.
  15. Which of the following are keywords?
  16. When we implement an interface method, it should be declared as public.
  17. Session bean
  18. Servlet can have ___________
  19. Every call to wait has a corresponding call to notify that will eventually end the wafting.
  20. Which of the following are the wrapper classes?
  21. JSP files creates ________________
  22. Members of a class specified as private are accessible only to the methods of the class.
  23. executeUpdate(------------) returns ___________
  24. Which of the following statements are valid array declarations?
  25. When we implement the Runnable interface, we must define the method
  26. It is an error if a class with one or more abstract methods is not explicitly declared abstract.
  27. In evaluating a logical expression of type 'Boolean expression 1&& Boolean expression 2', both the Boolean…
  28. Connection, Statement are interfaces and ResultSet is a class.
  29. Give file is a file object, which of the following are legal statements to create a new file.
  30. A thread can make second thread ineligible for execution by calling the suspend (-) method on second…