Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.*;
- public class Practice12 {
- public static void main(String[] args) {
- String src=null, dst=null;
- Vector<String> v=new Vector<String>();
- System.out.println("전체 경로명이 아닌 파일 이름만 입력하는 경우, 파일은 프로젝트 폴더에 있어야 합니다.");
- System.out.print("첫번째 파일 이름을 입력하세요>>");
- Scanner scanner1= new Scanner(System.in); src=scanner1.nextLine();
- v.add(src);
- System.out.print("두번째 파일 이름을 입력하세요>>");
- Scanner scanner2=new Scanner(System.in); dst=scanner2.nextLine();
- v.add(dst);
- System.out.println(src+"와 "+dst+"를 비교합니다.");
- System.out.println("파일이 같습니다.");
- System.out.println("파일이 다릅니다.");
- try{
- FileInputStream file1=new FileInputStream("v.get(src)");
- FileInputStream file2=new FileInputStream("v.get(dst)");
- }catch(IOException e) {
- System.out.println(e);
- }finally {
- /* try{
- }catch (IOException io) {}*/
- System.out.println("입출력 오류가 발생했습니다.");
- int srcCount=0, destCount;
- for(int i=0;i<srcCount;i++) {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement