In the given incomplete program where a File instance is created, information such as the path, along with its read and write privileges are obtained. Can you fill the blanks in the code so that it correctly displays this information? Remember, you're only allowed to use the features and concepts of Java you've learned so far.
File class
Working with file data in Java
Report a typo
Fill in the gaps with the relevant elements
import java.io.;
public class CheckFileProperties {
public static void main([] args) {
File ();
String +
"\nFile path: " + tempFile +
"\nFile is readable: " + tempFile +
"\nFile is writable: " + tempFile;
(fileInfo);
}
}Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.