
Asked in Netxd Software
Given an array of numbers, find the second largest number.

AnswerBot
2y
To find the second largest number in an array of integers.
Sort the array in descending order and return the second element.
Iterate through the array and keep track of the two largest numbers.
Use a pri...read more
Geethika Kodidela
1y
Package com.candidjava;
public class SecondLargest
{
public static void main(String[] args)
{
int arr[] = { 14, 46, 47, 86, 92, 52, 48, 36, 66, 85 };
int largest = arr[0];
int secondLargest = arr[0];
System.o...read more
Help your peers!
Add answer anonymously...
Interview Questions Asked to Java Trainee at Other Companies
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

