added java 007 solution, edited 007 c++ solution