Henry E.

asked • 10/11/20

programming Please help me !!!!!!!!!

Create two files using any word – processing program or text editor. Write an application that determines whether the two files are located in the same folder

1 Expert Answer

By:

Patrick B. answered • 10/11/20

Tutor
4.7 (31)

Math and computer tutor/teacher

Henry E.

Can you complete this code while achieving the intended output in my question, please. thank you for your help package samefolder; import java.util.*; import java.text.*; import java.io.*; import java.io.File; public class SameFolder { private static Object f; public static void main(String[] args) { final Formatter sup; try { File file = new File("C:\\Users\\saint\\Desktop"); File f = new File("C:\\Users\\saint\\Desktop"); if(!file.exists() && !f.exists()) { file.createNewFile(); f.createNewFile(); } sup = new Formatter("FileStatistics.java"); System.out.println("File created ^-^!"); System.out.println("Folder created! ^-^"); } catch (IOException e) { System.out.println("IO Exception"); System.out.println("File not created! ;^;"); System.out.println("Folder not created! -_-*"); } } }
Report

10/12/20

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.