Copy Content of One file to another file using Java. package com.pukhraj.blog; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class FileCopy { public static void main(String[] args) throws IOException { File inFile = new File("FullPath/inputFileName.extension"); File outFile = new File("FullPath/outputFileName.extension"); FileReader in = new FileReader(inFile); FileWriter out = new FileWriter(outFile); int i; while ((i = in.read()) != -1) out.write(i); in.close(); out.close(); } }
Why does Java suck so much? Nope, It's too easy, If you have some experience. Is Java a dying technology? Nope, It's an stable language. Is Java good or bad? Very Good.