0
package AlgoritmosII;
import javax.swing.*;
public class Trabalho1 {
    public static void main(String[] args){
        String[][] A = new String[3][3];
        int[][] B = new int[3][3];
        double[][] C = new double[3][3];
        double[] Ordenar_C = new double[9];
        double recebimento, pagamento, maior_saldo=0, aux;
        int flag=0, numero, i, j, n1=0, n2=0, Control, k=0, troca, fim;
        A[0][0]= "Tibúrcio";
        A[0][1]= "Ricardo";
        A[0][2]= "João";
        A[1][0]= "Felisbino";
        A[1][1]= "Seu Zé";
        A[1][2]= "Dona Maria";
        A[2][0]= "Gedonstrôncio";
        A[2][1]= "Batman";
        A[2][2]= "Homem de Ferro";
        B[0][0]= 111;
        B[0][1]= 222;
        B[0][2]= 333;
        B[1][0]= 444;
        B[1][1]= 555;
        B[1][2]= 666;
        B[2][0]= 777;
        B[2][1]= 888;
        B[2][2]= 999;
        C[0][0]= 0.0;
        C[0][1]= 0.0;
        C[0][2]= 0.0;
        C[1][0]= 0.0;
        C[1][1]= 0.0;
        C[1][2]= 0.0;
        C[2][0]= 0.0;
        C[2][1]= 0.0;
        C[2][2]= 0.0;
        while(flag==0) {
            Control = Integer.parseInt(JOptionPane.showInputDialog(" 1- Inserir Recebimento \n 2- Inserir Pagamento \n 3- Mostrar informações \n 4- Correntista mais rico \n 5- Saldos em ordem crescente \n 6- Sair"));
            switch (Control) {
                case 1:
                    numero = Integer.parseInt(JOptionPane.showInputDialog("Digite o numero da conta para Inserir o Recebimento: "));
                    recebimento = Double.parseDouble(JOptionPane.showInputDialog("Digite o valor do Recebimento: "));
                    for (i=0;i<3;i++) {
                        for (j=0;j<3;j++) {
                            if (numero == B[i][j]) {
                                n1 = i;
                                n2 = j;
                                C[n1][n2] = C[n1][n2] + recebimento;
                            }
                        }
                    }
                    JOptionPane.showMessageDialog(null, A[n1][n2]+" seu saldo atual é de: "+C[n1][n2]);
                    break;
                case 2:
                    numero = Integer.parseInt(JOptionPane.showInputDialog("Digite o numero da conta para Retirar o Pagamento: "));
                    pagamento = Integer.parseInt(JOptionPane.showInputDialog("Digite o valor do Pagamento: "));
                    for (i=0;i<3;i++) {
                        for (j=0;j<3;j++) {
                            if (numero == B[i][j]) {
                                n1 = i;
                                n2 = j;
                                C[n1][n2] = C[n1][n2] - pagamento;
                            }
                        }
                    }
                    JOptionPane.showMessageDialog(null, A[n1][n2]+" seu saldo atual é de: "+C[n1][n2]);
                    break;
                case 3:
                    //3–Mostre em apenas uma mensagem todos os Números de Conta, Correntistas e Saldos respectivos.
                    break;
                case 4:
                    for (i=0;i<3;i++){
                        for (j=0;j<3;j++){
                            if (maior_saldo < C[i][j]){
                                maior_saldo = C[i][j];
                                n1 = i;
                                n2 = j;
                            }
                        }
                    }
                    JOptionPane.showMessageDialog(null,"O Correntista mais rico é:\n Correntista: "+A[n1][n2]+"\n Número da conta:  "+B[n1][n2]+"\n Saldo: "+C[n1][n2]);
                    break;
                case 5:
                    for (i=0;i<3;i++){
                        for (j=0;j<3;j++){
                            Ordenar_C[k] = C[i][j];
                            k++;
                        }
                    }
                    troca = 0;
                    fim = 9-1;
                    while(troca==0){
                        troca=1;
                        for (k=0;k<fim;k++){
                            if (Ordenar_C[k] > Ordenar_C[k+1]){
                                aux = Ordenar_C[k];
                                Ordenar_C[k] = Ordenar_C[k+1];
                                Ordenar_C[k+1] = aux;
                                troca=0;
                            }
                        }
                        fim = fim-1;
                    }
                    for (k=0;k<9;k++){
                        JOptionPane.showMessageDialog(null,"Os saldos ordenados em forma crescente ("+k+"): \n"+Ordenar_C[k]);
                    }
                    break;
                case 6:
                    flag=1;
                    break;
                default:
                    JOptionPane.showMessageDialog(null, "Algo de errado não esta certo ;3");
            }
        }
    }
}
My problem is case 3: "Show in just one message all Account Numbers, Account Holders and respective Balances". My teacher told me:
-"Use text concatenation on a variable. Then only a showmessage".
-"Tip: for to concatenate text after a showmessage".
I haven’t really understood yet how I could do this but if possible I’d like to put:
Name: +A
Account number: +B
Balance: +C
But having to use only one message to it confused me a little bit, and I would like to know what I could do to show this information without using the indexes (e.g.: + A[0][0], Numero Conta: + B[0][0], Balance: + C[0][0]). 
Because it has to be done without using the indexes?
– Augusto Vasques
Because if I used larger matrices I could still use this code.
– Gatenho