Question
import java.io.*;
class files
{
public static void main(String args[])
{
File obj = new File("/java/system");
System.out.print(obj.getAbsolutePath());
}
}
a.
java
b.
system
c.
java/system
d.
\java\system
Posted under Java Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. Which of these class is used to read and write bytes in a file?
View solution
Q. Which of these method of InputStream is used to read integer representation of next available byte input?
View solution
Q. Which of these data type is returned by every method of OutputStream?
View solution
Q. Which of these is a method to clear all the data present in output buffers?
View solution
Q. Which of these method(s) is/are used for writing bytes to an outputstream?
View solution
Q. Which of these stream contains the classes which can work on character stream?
View solution
Q. Which of these class is used to read characters in a file?
View solution
Q. Which of these method of FileReader class is used to read characters from a file?
View solution
Q. Which of these class can be used to implement the input stream that uses a character array as the source?
View solution
Q. Which of these classes can return more than one character to be returned to input stream?
View solution
Q. Which of the following is not a segment of memory in java?
View solution
Q. Does code Segment loads the java code?
View solution
Q. What is JVM?
View solution
Q. Which one of the following is a class loader?
View solution
Q. Which class loader loads jar files from JDK directory?
View solution
Q. Which of the following is not a memory classification in java?
View solution
Q. What is the Java 8 update of PermGen?
View solution
Q. Classes and Methods are stored in which space?
View solution
Q. Where is String Pool stored?
View solution
Q. The same import package/class be called twice in java?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!