Plubelle89
Messages postés1Date d'inscriptionmercredi 8 décembre 2010StatutMembreDernière intervention26 avril 2011
-
26 avril 2011 à 21:25
cs_Julien39
Messages postés6414Date d'inscriptionmardi 8 mars 2005StatutModérateurDernière intervention29 juillet 2020
-
27 avril 2011 à 15:05
Slt, jé un problème avec la classe Scanner jé implémenté ce code mais toujours il m'affiche le msg File Not Found c'est a dire il n'a pa pu trouvé le fichier!! c koi la solution?? merciii
public class Main1
{
public static void main(String args[])
{
try{
Scanner s = new Scanner(new FileInputStream("File.txt"));
while(s.hasNextLine())
{
String ligne=s.next();
System.out.println(ligne);
}
s.close();
}
catch(FileNotFoundException e){
System.out.println("File Not Found");
}
}
}