system out print( )system out flush()//public static string getstring(throws ioexception inputstreamreader isr new inputstreamreader(system in)bufferedreader br new bufferedreader(isr)string br readline()return //public static char getchar(throws ioexception string getstring()return charat( )//public static int getint(throws ioexception string getstring()return integer parseint( )///end class heapapp the array places the heap' root at index some heap implementations start the array with the root at using position as sentinel value with the largest possible key this saves an instruction in some of the algorithmsbut complicates things conceptually the main(routine in heapapp creates heap with maximum size of (dictated by the limitations of the display routineand inserts into it nodes with random keys then it enters loop in which the user can enter siror cfor showinsertremoveor change here' some sample interaction with the programenter first letter of showinsertremovechanges heaparray