J A V A
1. Write a program to copy a file to another file using Java to package classes. Get the
file names at run time and if the target file is existed then ask confirmation to
overwrite and take necessary actions.
2nd. Program to get file name at runtime and display number f lines and words in
that file.
Answers
Answered by
6
Attachments:
Answered by
6
Answer:
1-import java.io.*;
import java.util.*;
class Copyfile {
public static void main(String arg[]) throws Exception {
Scanner sc = new Scanner(System.in);
System.out.print("Provide source file name :");
String sfile = sc.next();
System.out.print("Provide destination file name
Explanation:
hope it helps to u
Similar questions