Create a java application hold five doubles in an array


Discuss the below:

Q: Create a Java application that can hold five doubles in an array, and display the doubles from first to last, and then display the doubles from last to first. Use the following logic for BubbleSort to sort and display the array in sequence.

Int comparisonToMake = someNums.length - 1;
for (a = 0; a < someNums.length - 1; ++a)
(
for(b = 0; < comparisonToMake; ++b)
(
if(someNums[b] > sp,eMi,s[b + 1])
(
temp = someNums [b];
someNums[b] > = someNums[b + 1]';
someNums[b + 1] = temp;
)
)
--comparisonToMake;
)

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a java application hold five doubles in an array
Reference No:- TGS01934566

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)