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 statements are valid array declarations?
  2. The import statement is always the first no comment statement in a Java program files.
  3. Which javadoc tag is used to denote a comment for methods parameters?
  4. If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
  5. Which of the following methods can be used to change the size of a size() *resize()
  6. Which of the following statements are true?
  7. Give file is a file object, which of the following are legal statements to create a new file.
  8. Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
  9. Declarations can appear anywhere in the body of a Java method.
  10. The break statement is required in the default case of a switch selection structure.
  11. The setBackground() method is part of the class
  12. A catch can have comma-separated multiple arguments.
  13. Which of the following will produce a value of 22 if x=22.9:
  14. Two methods cannot have the same name in Java.
  15. Which of the following represent legal flow control statements?
  16. A Java monitor must either extend thread class or implement Runnable interface.
  17. Any class may be inherited by another class in the same package.
  18. Session bean
  19. Which of the following statements are true?
  20. Which of the following classes are available in the java.lang package?
  21. Which are the valid ways to create DataInputStream streams?
  22. Which key word can protect a class in package from accessibility by the classes outside the package?
  23. Which of the following are keywords?
  24. In RMI we invoke client method from remote server
  25. DataInput is
  26. A class may be both abstract and final.
  27. Which of the following represent legal flow control statements?
  28. Which of the following are not keywords?
  29. In RMI before running the client program we must start RMI Registry.
  30. Which of the following keywords are used to control access to a class member?