Lompat ke konten Lompat ke sidebar Lompat ke footer

JDK File & Installation


Free Download JDK Here:


Stream classification based on data

Two types of classes exist: 

Classes which contain the word stream in their name are byte oriented and are here since JDK1.0. These streams can be used to read/write data in the form of bytes. Hence classes with the word stream in their name are byte-oriented in nature. Examples of byte oriented streams are FileInputStream, ObjectOutputStream etc. 

Classes which contain the word Reader/Writer are character oriented and read and write data in the form of characters. Readers and Writers came with JDK1.1. Examples of Reader/Writers are FileReader, PrintWriter etc.

Adding Persistence Functionality  

Hopefully,  your address book you built previously  is giving you the required results except one i.e. persistence. You might have noticed that after adding some person records in the address book; if you exit from the program next time on re-executing address book all the previous records are no more available.  

To overcome the above problem, we will modify our program so that on exiting/starting of address book, all the previously added records are available each time. To achieve this, we have to provide the persistence functionality. Currently, we will accomplish this task by saving person records in some text file.  

Supporting simple persistence by any application requires handling of two scenarios. These are  • On start up of application - data (person records) must be read from file • On end/finish up of application - data (person records) must be saved in file  

To support persistence, we have to handle the above mentioned scenarios  

Posting Komentar untuk "JDK File & Installation"