Revolut Interview Question

Simple coding to check knowledge of java