Home » Java Program to find Third Largest Number in an Array

Java Program to find Third Largest Number in an Array

by Online Tutorials Library

Java Program to find Third Largest Number in an Array

We can find the third largest number in an array in java by sorting the array and returning the 3nd largest number. Let’s see the full example to find the third largest number in java array.

Test it Now

Output:

Third Largest:3 Third Largest:66 

Find 3rd Largest Number in Array using Arrays

Let's see another example to get third largest element or number in java array using Arrays.

Test it Now

Output:

Third Largest: 3 Third Largest: 66 

Find 3rd Largest Number in Array using Collections

Let's see another example to get third largest number in java array using collections.

Test it Now

Output:

Third Largest: 3 Third Largest: 66 
Next TopicJava Programs

You may also like