Click here to Skip to main content
14,426,633 members
   

Java

 
GeneralRe: Help with a website written in Java Pin
Tim Kohl27-Nov-19 22:21
MemberTim Kohl27-Nov-19 22:21 
GeneralRe: Help with a website written in Java Pin
Gerry Schmitz28-Nov-19 6:37
mveGerry Schmitz28-Nov-19 6:37 
QuestionMessage Closed Pin
24-Nov-19 7:42
Memberravens game24-Nov-19 7:42 
QuestionHelp With Sorting Multidimensional String Array Pin
eskomo8424-Nov-19 7:15
Membereskomo8424-Nov-19 7:15 
AnswerRe: Help With Sorting Multidimensional String Array Pin
Richard MacCutchan24-Nov-19 7:23
communityengineerRichard MacCutchan24-Nov-19 7:23 
GeneralRe: Help With Sorting Multidimensional String Array Pin
eskomo8424-Nov-19 7:45
Membereskomo8424-Nov-19 7:45 
GeneralRe: Help With Sorting Multidimensional String Array Pin
Richard MacCutchan24-Nov-19 7:52
communityengineerRichard MacCutchan24-Nov-19 7:52 
GeneralRe: Help With Sorting Multidimensional String Array Pin
eskomo8424-Nov-19 10:09
Membereskomo8424-Nov-19 10:09 
I'm sorry if I misspoke about it being only a two dimensional array.

My array is is set up as
String [][] contactsArray = new String[30][3]; (data provided in first post)

I'm passing the multidimensional array into the Method sortContacts() as one of the parameters. Once the data is passed, I need to sort the array based on the second element (last name).

I know how to use the sample coding below for a single string, but can't figure out how to apply this to a multidimensional array

for (int i = 0; i < num; i++) 
         {
             for (int j = i + 1; j < num; j++) 
             {
                    //Swap if method returns positive integer
                 if (names[i].compareTo(names[j])>0) 
                 {
                     temp = names[i];
                     names[i] = names[j];
                     names[j] = temp;
                 }
             }
         }





GeneralRe: Help With Sorting Multidimensional String Array Pin
Richard MacCutchan25-Nov-19 0:14
communityengineerRichard MacCutchan25-Nov-19 0:14 
QuestionJavaFX Background not beeing used on a ScrollPane element [Solved] Pin
Valentinor24-Nov-19 5:48
MemberValentinor24-Nov-19 5:48 
AnswerSolution Pin
Valentinor27-Nov-19 7:40
MemberValentinor27-Nov-19 7:40 
QuestionMessage Closed Pin
22-Nov-19 22:40
MemberMember 1466552522-Nov-19 22:40 
Question!!Please Help!! Student Needs Help It Shows me exercise/ wrong catagory moved to web dev JS Pin
Member 1465076510-Nov-19 7:04
MemberMember 1465076510-Nov-19 7:04 
QuestionRe: !!Please Help!! Student Needs Help It Shows me exercise 2 is correct but exercise 1 is not defined Pin
Richard MacCutchan10-Nov-19 7:24
communityengineerRichard MacCutchan10-Nov-19 7:24 
AnswerRe: !!Please Help!! Student Needs Help It Shows me exercise 2 is correct but exercise 1 is not defined Pin
Member 1465076510-Nov-19 12:15
MemberMember 1465076510-Nov-19 12:15 
AnswerRe: !!Please Help!! Student Needs Help It Shows me exercise 2 is correct but exercise 1 is not defined Pin
Member 1465076510-Nov-19 13:03
MemberMember 1465076510-Nov-19 13:03 
QuestionGlobal Histogram Implementation in Java Pin
Member 146130164-Oct-19 12:37
MemberMember 146130164-Oct-19 12:37 
AnswerRe: Global Histogram Implementation in Java Pin
phil.o4-Oct-19 23:06
mvephil.o4-Oct-19 23:06 
QuestionBiometric attendace machine data Pin
Member 146125164-Oct-19 2:15
MemberMember 146125164-Oct-19 2:15 
AnswerRe: Biometric attendace machine data Pin
Richard MacCutchan4-Oct-19 4:19
communityengineerRichard MacCutchan4-Oct-19 4:19 
AnswerRe: Biometric attendace machine data Pin
Gerry Schmitz4-Oct-19 7:35
mveGerry Schmitz4-Oct-19 7:35 
QuestionNeed to develop a program on Java for desktop Pin
Ryder Weber1-Oct-19 4:32
MemberRyder Weber1-Oct-19 4:32 
AnswerRe: Need to develop a program on Java for desktop Pin
Richard MacCutchan1-Oct-19 5:13
communityengineerRichard MacCutchan1-Oct-19 5:13 
AnswerMessage Closed Pin
1-Oct-19 6:44
MemberWishe19911-Oct-19 6:44 
AnswerRe: Need to develop a program on Java for desktop Pin
Gerry Schmitz4-Oct-19 21:35
mveGerry Schmitz4-Oct-19 21:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.