Fast Enterprises interview question

Write a method that checks whether a number is prime.