The class I find useful is the FileReader class in java.io. It allows you to read an external file in your program. For instance, Consider a file input.txt: Hello How are you? 1 2 3 4 5 You can...
For java 5.0, there is a really easy way to read text from a file, and there is an option to read whole objects from a file.
= To read a Text external file =
The simplest way is to use the Scanner...
I dont know you are looking for write new program to compress the data.. I am providing code to zip the file in Java.
ZipOutputStream zipOutStream = new ZipOutputStream( new BufferedOutputStream(...
A java file contains the code you write. One java file contains one class so for example when I want to make a class called Person, the source code is saved in Person.java