the draw button sometimes while running the sorting algorithm at full speedthe computer takes time off to perform some other task this can result in some bars not being drawn if this happensyou can press the draw button to redraw all the bars doing so pauses the runso you'll need to press the run button again to continue you can press draw at any time there seems to be glitch in the display java code for bubble sort in the bubblesort java programshown in listing class called arraybub encapsulates an array []which holds variables of type double in more serious programthe data would probably consist of objectsbut we use primitive type for simplicity (we'll see how objects are sorted in the objectsort java program in the last section of this alsoto reduce the size of the listingwe don' show find(and delete(methods with the arraybub classalthough they would normally be part of such class listing the bubblesort java program /bubblesort java /demonstrates bubble sort /to run this programc>java bubblesortapp //class arraybub private double[ /ref to array private int nelems/number of data items //public arraybub(int max/constructor new double[max]/create the array nelems /no items yet //public void insert(double value/put element into array [nelemsvalue/insert it nelems++/increment size //public void display(/displays array contents