Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/04/2013, 07:34
HelThunder
 
Fecha de Ingreso: abril-2013
Mensajes: 3
Antigüedad: 11 años, 1 mes
Puntos: 0
Respuesta: Lectura ficheros de texto (Basica)

Muchas gracias Fuzzylog.

Ya he conseguido solucionarlo, pero ahora me surge un nuevo problema.

Primero pongo como lo he solucionado;
Código:
	public static void main (String []args){
		String nombreFichero = "D:/datos/BAY.txt";
		try{
			String texto = ""; int edad;
			Scanner plantilla = new Scanner(new File (nombreFichero));
			plantilla.nextLine();
			plantilla.nextLine();
			while (plantilla.hasNextLine()){
			    texto = plantilla.nextLine().substring(14, 16);
				edad = Integer.valueOf(texto);
				System.out.println(edad);
			}
			plantilla.close();
		}
		catch (Exception e){}
		}