5 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.getParent());
System.out.print(" " + obj.isFile());
}
}

Note: file is made in c drive.

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

Overall Stats

Attempted 167
Correct 16
Incorrect 80
Viewed 71

Answers

Guest
Guest
Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying java false is correct answer

Zo Go
Zo Go - 1 month ago

Zo Go from Casablanca, Morocco is saying \java true is correct answer

zainb ryad
zainb ryad - 2 months ago

zainb ryad from Jenin, Palestine is saying \java true is correct answer

Charlton Olmos
Charlton Olmos - 3 months ago

Charlton Olmos from Lincoln, Canada is saying java true is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying java false is correct answer

Related Questions

Which of these class can be used to implement input stream that uses a character array as the source?

  • [A] BufferedReader
  • [B] FileReader
  • [C] CharArrayReader
  • [D] FileArrayReader