I want to write a java program in JCreator which will create an unsorted array of integers, will sort the elements in the array and output the sorted array.
I want to create a static array to hold the integers 5,10,8,16,20,17,18,11,1,3,13,19 in that order. Write a static method called swap() which will swap the integers in two adjacent array positions. Write a static method called bubble() which will call the swap method and sort the elements of the array into assending order. Write a static method called formatOutput() to print the sorted array. Call bubble() and formatOutput() in the main method.
I havent got any code as I dont even know where to start!
Please help
2006-11-27
21:29:33
·
4 answers
·
asked by
Princess Peach
3
in
Computers & Internet
➔ Programming & Design