American Express interview question

Basics of Java and coding