ArrayList<Class> class class.setString()
Bonjour, mon soucis c'est que ma méthode setStringNom() est indéfinis pour un type ArrayList pour le compilot. Mon setStringNom() est écrit dans ma classe Client
Code:
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 31 32 33 34
|
public class NavigatorClientFic
{
String stringNom,stringPrenom,stringAdresse,stringCodePostal,stringVille,stringPays,stringTel,stringMel;
String stringCompteur;
ArrayList<Client> client = new ArrayList<Client>();
public void ficheClientAfficher()
{
try
{
Scanner sc = new Scanner(new File("Client.txt"));
sc.useDelimiter(Pattern.compile(":"));
String champ;
champ = sc.next();
stringNom = champ;
client.setStringNom(champ);
System.out.println(champ);
sc.close();
}
catch (IOException exception)
{
System.out.println ("Erreur lors de la lecture : " + exception.getMessage());
}
}
} |
Je vois pas où est mon erreur. Merci d'avance.