1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
   | public class RecupText {
	public static void main(String[] args){
 
		String fichier ="Liens.txt";	
                String[]tab = null ;	
 
		//lecture du fichier texte à 38 lignes
		try{
			InputStream ips=new FileInputStream(fichier);
			InputStreamReader ipsr=new InputStreamReader(ips);
			BufferedReader br=new BufferedReader(ipsr);
			String ligne = null;			
			while ((ligne=br.readLine())!=null){
				for (int i=1; i< 38; i++)
				{
					tab[i] = ligne;
					System.out.println(tab);
				}
 
			}
			br.close(); 
		}		
		catch (Exception e){
			System.out.println(e.toString());
		}
 
 
 
	}
} |