Add solution by java