MCQ
File fileobj new File(”/etc/passwd”); How can this statement refer to create Java file object?
  • A
    By specifying directory and filename as two separate arguments
  • B
    By using the reference to directory encapsulated in its object
  • By specifying relative path
  • D
    By specifying Incomplete path

Answer

Correct option: C.
By specifying relative path
By specifying relative path

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free