You are on page 1of 2

System.out.

print(" "+matriz[i][j]);

}System.out.println("");

public void ordenar(String matriz[][]){

System.out.print(matriz[3][0]+" : "+matriz[3][1]);

System.out.println("");

System.out.print(matriz[2][0]+" : "+matriz[2][1]);

System.out.println("");

System.out.print(matriz[1][0]+" : "+matriz[1][1]);

System.out.println("");

System.out.print(matriz[0][0]+" : "+matriz[0][1]);

System.out.println("");

package javaapplication5;

public class Principal4 {

public static void main(String[] args) {

Problema4 ob1 = new Problema4();

String [] array = new String[4];

String [] arrnot1 = new String[4];

double [] arrnot2=new double[4];

String [][] matriz = new String[4][4];

ob1.nombres(array);
ob1.pasar(array, arrnot1, matriz);

System.out.println("----->Las notas con nombres son : ");

ob1.mostrar1(matriz);

System.out.println("------>Notas ordenadas son : ");

ob1.ordenar(matriz);

Compilación
run:

Ingrese los nombres de los alumnos:

jairo

luis

abel

juan

----->Las notas con nombres son :

jairo 10.2

luis 11.4

abel 12.8

juan 14.6

------>Notas ordenadas son :

juan : 14.6

abel : 12.8

luis : 11.4

jairo : 10.2

BUILD SUCCESSFUL (total time: 10 seconds)

You might also like