Java logic to Check if given number is Prime

Complete and Continue