Add java solution in it.