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.getName());
}
}

[A] java
[B] system
[C] java/system
[D] /java/system
Loading...
Next Question

Overall Stats

Attempted 197
Correct 42
Incorrect 55
Viewed 100

Answers

Guest
Guest
akshay kharat
akshay kharat - 4 days ago

akshay kharat from Pune, India is saying java/system is correct answer

Vaibhav Bisht
Vaibhav Bisht - 4 weeks ago

Vaibhav Bisht from Dehradun, India is saying java/system is correct answer

Zo Go
Zo Go - 1 month ago

Zo Go from Casablanca, Morocco is saying system is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying /java/system is correct answer

Michael Nguyễn
Michael Nguyễn - 6 months ago

Michael Nguyễn from Hanoi, Vietnam is saying system is correct answer

Related Questions

Which of these interface is not a member of java.io package?

  • [A] DataInput
  • [B] ObjectInput
  • [C] ObjectFilter
  • [D] FileFilter