I need help with the following JavaProgram:
For this lab, you will be writing a sorting algorithm. Thissorting algorithm will order a list of candy bars based on weight.You may sort in either ascending or descending order. Pick yourfavorite algorithm from class to implement.
1. Open the class called Lab17. Notice there is already codeinside main. I have also included method stubs for each sortingalgorithm. Pick one of these sorting algorithms and write the codeinside the corresponding method stub.
2. Update the main() method to call your sorting algorithmmethod. Currently, main calls the selectionSort() method.
3. If your sorting algorithm is correct, the second
OR
OR