Infosys Interview Question

Write a java program to find whether the number is prime or not , an aptitude question was asked and few more basic technical questions were asked.