Q. What will be output for the following code? Note: file is made in c drive
Code:
import java.io.*;
class files
{
public static void main(String args[])
{
File obj = new File(""/java/system"");
System.out.print(obj.canWrite());
System.out.print("" "" + obj.canRead());
}
}
β
Correct Answer: (D)
false false
Explanation: false false will be output for the following code.