Cognizant interview question

Introduction 4 codes are based on Java