Frage im Vorstellungsgespräch bei SAP

Sorting an array. IRCTC system design. Core java question like comparing two objects.