> Hi, I'm struggling with a programming issue in Java any help would be appreciated to link 2 arrays.?

Hi, I'm struggling with a programming issue in Java any help would be appreciated to link 2 arrays.?

Posted at: 2014-12-18 
I have a arrays:

Long [] salary = {500, 200, 1000, 2500}

String [] Name = {Sam, Dave, Jake, Ryan}

How do I link them to print out the name with the highest salary?

I've been suck for hours now.

You do not have to link the them. What you have is a parallel array and they are already linked by the index number.

Here is an example:

http://javablogx.blogspot.com/2014/10/so...

It uses a bubble sort.

for ( i=0; i<=4 ; i++ )

{

salary[i] = Name[i];

}

You can link this way.