CS8382-OBJECT ORIENTED PROGRAMMING LABORATORY-FILE HANDLING METHODS
CS8382-OBJECT ORIENTED PROGRAMMING LABORATORY QUESTION :Write a Java program that reads a file name from the user, displays information about whether the file exists, whether the file is readable, or writable, the type of file and the length of the file in bytes PROGRAM: import java.io.*; import java.util.Scanner; class Opfile{ Scanner sc= new Scanner(System.in); void show(){ String fname; //getting file name from user System.out.println("enter file name"); fname=sc.next(); //assign as file name File f= new File(fname); String line=null; try { FileReader fileReader=new FileReader(f); ...