Question 3 140 Points) C01 A. Write a Java program to check if a file specified by a pathname (take pathname as input fr
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Question 3 140 Points) C01 A. Write a Java program to check if a file specified by a pathname (take pathname as input fr
Question 3 140 Points) C01 A. Write a Java program to check if a file specified by a pathname (take pathname as input from the user) exists or not. If it is a text file & contains any character except English alphabet & number then delete all those invalid characters & rewrite the converted texts to another file named output.txt. [Hint: Consider ASCII values of the characters to filter characters.] Sample input file: Sample Output file: "I wish it need not have happened in my time,' said Frodo. Iwishitneednothavehappenedinmytimes So do I,' said Gandalf, and so do all who live aidFrodo SodoIsaidGandalfandsodoallw to see such times. But that is not for them to holivetoseesuchtimesButthatisnotforthe decide. All we have to decide is what to do mtodecide Allwehavetodecideiswhattod with the time that is given us. *** owiththetimethatisgivenus
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!