Java Code to Simulate Bully Algorithm