add solution in java