Add strategy pattern java example.