Create isPrimeMethod

Simple isPrime method written in Java for an assignment.