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

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

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


Overall Stats

Attempted 97
Correct 17
Incorrect 27
Viewed 53

Answers

Guest
Guest
Radwa Maher
Radwa Maher - 4 years ago

Radwa Maher from Romania is saying /java/system is correct answer

Poorvi
Poorvi - 4 years ago

Poorvi from Bengaluru, India is saying system is correct answer

Yahya Darwich
Yahya Darwich - 4 years ago

Yahya Darwich from Lebanon is saying system is correct answer

oumayma ben smaya
oumayma ben smaya - 4 years ago

oumayma ben smaya from Tunisia is saying java/system is correct answer

Nola li
Nola li - 4 years ago

Nola li from Chelsea, United States is saying /java/system 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

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

Which of these class is used to read characters in a file?

  • [A] FileReader
  • [B] FileWriter
  • [C] FileInputStream
  • [D] InputStreamReader