A java program to convet units