In this post under Java I will with example how to merge two or more text files. Below is the complete code for your reference Main class 1 package io;2 3 import java.io.*;4 5 public class IOExample3 {6 private static int BYTES_TO_BE_READ = 1000;7 private char buffer[] = new char[BYTES_TO_BE_READ];8 9 public static void main(String[]…… Continue reading Merging text files
Tag: IO
Creating text file of user specified size with random data
In this post under Java, I will show with example how to create a text file of user specified size with random data. Below is the complete code for you example Main class 1 package io;2 3 import java.io.BufferedWriter;4 import java.io.File;5 import java.io.FileWriter;6 import java.io.IOException;7 import java.util.Random;8 9 public class IOExample1 {10 private Random random;11…… Continue reading Creating text file of user specified size with random data