Example of JAVA two way input