add solution explanation into javaDoc