1. Use following example and check the list of files in your folder import java.io.File; import java.util.Date; public class Exercise1 { public static void main(String a[]) { File file = new File("/home/students/"); String[] fileList = file.list(); for(String name:fileList){ System.out.println(name); } } } 2. Use the if statement like: if(name.toLowerCase().endsWith(".py")) to count how many txt files in your folder 3.Use java.io.File class and - Write a Java program to check if given pathname is a directory or a file - Write a Java program to get last modified time of a file. - Write a Java program to get file size in bytes, kb, mb (you can calculate missing values) - Write a Java program to read a file content line by line - Write a Java program to store text file content line by line into an array 4. Next example explain how to write into file. The class Scanner can't be used. You will need classes FileWriter, BufferedReader,InputStreamReader,InputStreamReader, FileReader,FileWriter These classes specification can be found in java.io package import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.io.FileInputStream; import java.io.FileReader; import java.io.FileWriter; public class Exercise4 { public static void main(String a[]){ StringBuilder sb = new StringBuilder(); String strLine = ""; try { String filename= "/home/students/myfile.txt"; FileWriter fw = new FileWriter(filename,false); //appends the string to the file fw.write("Python Exercises\n"); fw.close(); BufferedReader br = new BufferedReader(new FileReader("/home/students/myfile.txt")); //read the file content while (strLine != null) { sb.append(strLine); sb.append(System.lineSeparator()); strLine = br.readLine(); System.out.println(strLine); } br.close(); } catch(IOException ioe) { System.err.println("IOException: " + ioe.getMessage()); } } } - Write a Java program to write and read a plain text file using BufferedReader class.