bonjour,
j'ai essayé ce prg pour multidimensionnelle méthode surcharge,
en le compilant ce dernier me donne une erreur suivante aidez moi svp:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method parcourrirTab(String[][]) in the type Sdz1 is not applicable for the arguments (String[])
at Sdz1.main(Sdz1.java:6)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 public class Sdz1 { public static void main(String[] args) { String[]tab={"toto","tata","titi","tete"}; parcourrirTab (tab); System.out.println (tab); } static void parcourrirTab (String[][]tab) { for(String tab2[]:tab) { for(String str:tab2) System.out.println(str); } } }
Partager