for second loop and in inner condition
for ( int index = 0; index < data.length; index++)
if (largest2 < data[index && largest2<largest1]) {
largest2 = data [index];
}
system print etc
I am not sure but try this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.