Mphasis Interview Question

Asked to prime number Oops concepts