In this post, we will learn about the **sorting algorithms in java**.

## Sorting Algorithms

Sorting algorithms can be defined as a process of arranging the array elements in a way that they are either in ascending order or descending order. The most-used orders are numerical order and lexicographical order.

**For example:**

Consider the array: **int **Arr[10] = { 10, 4, 5, 2, 20, 35, 34, 17, 9, 14)**Now this array sorted in descending order will look like as given below:****int **Arr[10] = { 2, 4, 5, 9, 10, 14, 17, 20, 34, 35}

## Sorting in Java

There is various sorting algorithms java which of some important are listed and are explained one by one. These various **sorting techniques in java** are also frequently asked java interview questions.

**The list of types of sorting in java includes the following:**

These are indexes of top sorting algorithms in java with examples, click on the solution to understand each of the algorithms.

**1.** **Bubble Sort**

Implementation of bubble sort in Java*Explanation with Example.*

**2. Selection Sort**

Implementation of bubble sort in Java

*Explanation with Example.*

**3. Heap Sort**

Implementation of heap sort in Java*Explanation with Example.*

**4. Insertion Sort**

Implementation of Insertion sort in Java*Explanation with Example*

**5. Quick Sort**

Implementation of Quick sort in Java** Explanation with Example**.

**6. ****Merge Sort**

Implementation of Merge Sort.*Explanation with Example.*

**7. Shell Sort**

Implementation of Shell sort*Explanation with Example*

**8. Counting Sort**

Implementation of Counting sort.*Explanation with Example.*