run checks.java and give the input 2.then open another tab in terminal 3.then run checkd.java 4.the message gets stored in the text file.