Add java solution for REVC