Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * My first Java program.
- *
- */
- import java.util.Arrays;
- public class Employees {
- public static void main(String[] args) {
- String[] myStringArray = new String[]{"Rodney","Daniel","Bavita", "Peter", "Imran", "Lobosh", "Yuting", "Carl"};
- int[] myIntArray = new int[]{333,221,401,297,116,250,354,134};
- System.out.printf("\nSorted list of names.\n");
- /* args is the list of Employees. */
- Arrays.sort(myStringArray);
- for(int i = 0; i < myStringArray.length; i++) {
- System.out.println(myStringArray[i]);
- }
- System.out.printf("\nEnd of sorted list.\n");
- for(int j=0; j< 8; j++ ) {
- System.out.printf("\nScore: " + myStringArray[j] + ", " + myIntArray[j] + ".\n");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement