Bob Gateaux sends some code from a project he worked on a few years ago. Apparently, this was written before Java implemented loops. This technique does have the distinct advantage, however, of easily inserting “20227“ right there in the middle.

annualMileageChoice = new Choice();
annualMileageChoice.addItem(CHO_PLEASE_ENTER);
annualMileageChoice.addItem("500");
annualMileageChoice.addItem("1000");
annualMileageChoice.addItem("1500");
annualMileageChoice.addItem("2000");
annualMileageChoice.addItem("2500");
annualMileageChoice.addItem("3000");
annualMileageChoice.addItem("3500");
annualMileageChoice.addItem("4000");
annualMileageChoice.addItem("4500");
annualMileageChoice.addItem("5000");
annualMileageChoice.addItem("5500");
annualMileageChoice.addItem("6000");
annualMileageChoice.addItem("6500");
annualMileageChoice.addItem("7000");
annualMileageChoice.addItem("7500");
annualMileageChoice.addItem("8000");
annualMileageChoice.addItem("8500");
annualMileageChoice.addItem("9000");
annualMileageChoice.addItem("9500");
annualMileageChoice.addItem("10000");
annualMileageChoice.addItem("10500");
annualMileageChoice.addItem("11000");
annualMileageChoice.addItem("11500");
annualMileageChoice.addItem("12000");
annualMileageChoice.addItem("12500");
annualMileageChoice.addItem("13000");
annualMileageChoice.addItem("13500");
annualMileageChoice.addItem("14000");
annualMileageChoice.addItem("14500");
annualMileageChoice.addItem("15000");
annualMileageChoice.addItem("15500");
annualMileageChoice.addItem("16000");
annualMileageChoice.addItem("16500");
annualMileageChoice.addItem("17000");
annualMileageChoice.addItem("17500");
annualMileageChoice.addItem("18000");
annualMileageChoice.addItem("18500");
annualMileageChoice.addItem("19000");
annualMileageChoice.addItem("19500");
annualMileageChoice.addItem("20000");
annualMileageChoice.addItem("20500");
annualMileageChoice.addItem("21000");
annualMileageChoice.addItem("21500");
annualMileageChoice.addItem("22000");
annualMileageChoice.addItem("22500");
annualMileageChoice.addItem("23000");
annualMileageChoice.addItem("23500");
annualMileageChoice.addItem("24000");
annualMileageChoice.addItem("24500");
annualMileageChoice.addItem("25000");
annualMileageChoice.addItem("25500");
annualMileageChoice.addItem("26000");
annualMileageChoice.addItem("26500");
annualMileageChoice.addItem("27000");
annualMileageChoice.addItem("27500");
annualMileageChoice.addItem("28000");
annualMileageChoice.addItem("28500");
annualMileageChoice.addItem("29000");
annualMileageChoice.addItem("29500");
annualMileageChoice.addItem("30000");
annualMileageChoice.addItem("30500");
annualMileageChoice.addItem("31000");
annualMileageChoice.addItem("31500");
annualMileageChoice.addItem("32000");
annualMileageChoice.addItem("32500");
annualMileageChoice.addItem("33000");
annualMileageChoice.addItem("33500");
annualMileageChoice.addItem("34000");
annualMileageChoice.addItem("34500");
annualMileageChoice.addItem("35000");
annualMileageChoice.addItem("35500");
annualMileageChoice.addItem("36000");
annualMileageChoice.addItem("36500");
annualMileageChoice.addItem("37000");
annualMileageChoice.addItem("37500");
annualMileageChoice.addItem("38000");
annualMileageChoice.addItem("38500");
annualMileageChoice.addItem("39000");
annualMileageChoice.addItem("39500");
annualMileageChoice.addItem("40000");
annualMileageChoice.addItem("40500");
annualMileageChoice.addItem("41000");
annualMileageChoice.addItem("41500");
annualMileageChoice.addItem("42000");
annualMileageChoice.addItem("42500");
annualMileageChoice.addItem("43000");
annualMileageChoice.addItem("43500");
annualMileageChoice.addItem("44000");
annualMileageChoice.addItem("44500");
annualMileageChoice.addItem("45000");

 

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!