In this article we will try to cover what all functionalities are being offered by Java I/O API. It can be used to write program data in files on your hard drive and later read them. This will allow you to not lose data when you Java program is started and stopped and re-started.

We have 2 options here to work with

  1. Old Java I/O (input/outut) API
  2. NIO.2 (non blocking I/O)

Most of the time in the applications that are written now, we tend to use NIO.2.