Ver Mensaje Individual
  #4 (permalink)  
Antiguo 08/07/2015, 06:47
Avatar de Tipdar
Tipdar
 
Fecha de Ingreso: octubre-2005
Ubicación: Aquí y allá.
Mensajes: 323
Antigüedad: 18 años, 6 meses
Puntos: 7
Respuesta: Como ingresar un valor a una matriz en una posición especifica

Código:
int[][] matriz = new int[5][5];
		
		
Scanner teclado = new Scanner(System.in);
System.out.println("Entre x");
int posx = teclado.nextInt();
System.out.println("Entre y");
int posy = teclado.nextInt();
System.out.println("Entre valor");
int valor = teclado.nextInt();
		
matriz[posx][posy] = valor;

Tienes que importar java.util.Scanner.
__________________
El último TipdaR