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

Answer

Correct option: A.
By specifying directory and filename as two separate arguments
By specifying directory and filename as two separate arguments

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