Tableau

amasou Messages postés 36 Date d'inscription mardi 12 mai 2009 Statut Membre Dernière intervention 1 septembre 2010 - 5 mai 2010 à 14:12
amasou Messages postés 36 Date d'inscription mardi 12 mai 2009 Statut Membre Dernière intervention 1 septembre 2010 - 5 mai 2010 à 14:23
Bonjour
es que vous pouvez m'aider je suis bloque
comment passe des paramètre d'un objet tableau de type classe
le probleme ici B c=new B([new C(0, 0, null, null)], 0);//problem
Class C
int age ,id;
String nom,prenom;
public C(int id,int age,String nom,String prenom){
this.nom=nom;
this.prenom=prenom;
this.age=age;
this.id=id;

}


Class B{
String nom;
C []tab;
C t3[];
public Carnet(C []tab,int a )throws
{
t3=new C [a];
tab=new C [a];

}

public static void main(String[] args) {
C p=new C(0, 0, null, null);
B c=new B(, 0);//problem
c.s1);
System.out.println(c.s(1));


merci

2 réponses

johnjjj Messages postés 120 Date d'inscription dimanche 4 avril 2010 Statut Membre Dernière intervention 24 septembre 2012
5 mai 2010 à 14:21
classe B

Class B{
String nom;
C []tab;
C t3[];
public B (C []tab,int a )throws
{
t3=new C [a];
tab=new C [a];
0
amasou Messages postés 36 Date d'inscription mardi 12 mai 2009 Statut Membre Dernière intervention 1 septembre 2010
5 mai 2010 à 14:23
classe B

Class B{
String nom;
C []tab;
C t3[];
public B (C []tab,int a )
{
t3=new C [a];
tab=new C [a];}
0
Rejoignez-nous