Sysco LABS Interview Question

Java codes to make sure i know this