πŸ“Š JAVA
Q. What will be the output of the following Java program? (Note: file is made in c drive.)
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) False
  • (C) java/system
  • (D) \java\system
πŸ’¬ Discuss
βœ… Correct Answer: (D) \java\system

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
96
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
93%
Success Rate