Company.com Interview Question

Based on java programming language