I am just learning to program in java, in blueJ, I need to create a code to calculate the salary of workers and in the end print the data of each worker (name, rut, contract, etc) in a matrix, I have been trying to do the matrix to print 4 data, but the blueJ throw me just nullnullnullnull, I do not know what to do to make it work or how I have to do so to print a matrix that has numbers and characters, I leave my code
public class Trabajador
{
public static void getDatos (){
String rut;
String nombre ;
String contrato;
Scanner leer = new Scanner(System.in);
System.out.println("Ingrese numeros de trabajadores");
int j = leer.nextInt();
String matriz [][] = new String [j][4];
int y=0;
for(int i=0; i < j; i++){
System.out.println ("Ingrese nombre del trabajador");
nombre = leer.next();
nombre = matriz [i][0];
System.out.println("Ingrese el rut sin guión");
rut = leer.next();
rut = matriz [i][1];
System.out.println("¿Que tipo de contrato tiene? a.partTime b.Contrato c.Planta");
contrato = leer.next();
contrato = matriz [i][2];
}
for (int x=0; x < matriz.length; x++){
for(y=0; y < matriz[x].length; y++){
System.out.print(matriz[x][y]);
}
}
} }