Understanding the principles of Java IO, the relationship between input and output and java programs