A voir également:
- Segmentation des phrases
- Trouver une phrase avec des lettres dans le désordre - Forum Loisirs / Divertissements
- Erreur de segmentation c - Forum C
- Erreur de segmentation C++ ✓ - Forum C++
- Faire une phrase avec différents mots ✓ - Forum Loisirs / Divertissements
- Segmentation fault(core dumped ) avec gmp ✓ - Forum C
exemple :
for(int i=0;i<tab.length;i++)
{
if( tab[i].equals("a"))
{
System.out.printn("il contient la lettre a");
}
}
for(int i=0;i<tab.length;i++) { if( tab[i] == 'a') { System.out.println("il contient la lettre a"); } }il n'affiche aucun message
String s = "amour"; char[] tab = s.toCharArray(); for (int i = 0; i < tab.length; i++) { if (tab[i] == 'a') { System.out.println("il contient la lettre a"); } }