This question is based on ICSE Class X (Scanner and PrintWriter classes).
So please give your answer according to the level of class X.