Java Program For String Operations Powershell If Statement