bash script for input and learning Java