I am having trouble starting a program that needs to sort arrays. I need to have the user input the number of employess -which will set the number of arrays, then the user will enter differnt values into each array which should be private, such as name, age, salary, number of years in company, and number of hours work a day. then I have to sort they arrays by name, salary number of years in the compay and then number of hours work a day.

Recommended Answers

All 2 Replies

To determine the size of the array:

-Create a variable called size that represents the size the user wants the array to be
-Ask the user what they want the size of each array to be
-Initialize the arrays using the variable, size, that you created earlier.

Once you get that far post your code and I'll help more.

Here is a tutorial on how to work with Arrays in Java and here you will find a tutorial on how to take input from the Console.

Be a part of the DaniWeb community

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