Unresolved compilation problem:
Bonjour,
voilà j'ecris le programme suivant
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
package Mypackage;
import java.util.Scanner;
public class exercjavascanne
{
public static void main(String[]args)
{
String[]tab={"Simon","Chris","David","Sarko","Sego","Hardy","Patrick","Franck","Samir"};
Scanner sc=new Scanner(System.in);
System.out.print("Entrez un nom:");
String nom=sc.nextLine();
String reponse="Ce nom ne se trouve pas dans notre system";
for(int i=0;i<tab.length;i++)
if(tab[i].equals(nom))
{
reponse="Ce nom se trouve dans notre system;";
break;
}
}
System.out.print(reponse);
} |
Code:
1 2
|
System.out.print(reponse); |
.out et reponse souligné
en compilant mon programme
j'ai message suivant:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at Mypackage.exercjavascanne.main(exercjavascanne.java:5)
(exercjavascanne.java:5) //public static void main(String[]args)