6 years ago in Java File Input Output

What is the output of this program?

import java.io.*;
class files {
public static void main(String args[]) {
File obj = new File("/java/system");
System.out.print(" " + obj.isFile());

Note: file is made in c drive.

[A] java true
[B] java false
[C] \java false
[D] \java true
Next Question

Create your Digital Resume For FREE on your name's sub domain "yourname.wcard.io". Register Here!

Overall Stats

Attempted 177
Correct 17
Incorrect 87
Viewed 73


Ryan Smith
Ryan Smith - 2 months ago

Ryan Smith from Stoney Creek, Canada is saying java true is correct answer

DZ&UC N.Feroze
DZ&UC N.Feroze - 2 months ago

DZ&UC N.Feroze from Karachi, Pakistan is saying java true is correct answer

Harsh Kansal
Harsh Kansal - 6 months ago

Harsh Kansal is saying \java false is correct answer

atish lohade
atish lohade - 9 months ago

atish lohade from Aurangabad, India is saying \java true is correct answer

Bharath - 9 months ago

Bharath from Hyderabad, India is saying java true is correct answer

Related Questions

Which of these stream contains the classes which can work on character stream?

  • [A] InputStream
  • [B] OutputStream
  • [C] Character Stream
  • [D] All of the mentioned

Which of these is specified by a File object?

  • [A] a file in disk
  • [B] directory path
  • [C] directory in disk
  • [D] None of the mentioned