add a java with input and output