Deloitte interview question

They asked many technical questions on java and a coding question to print twin prime number