Bonjour,
J'ai un petit problème concernant la création d'un objet.
Voici ma classe principale (elle est censée créer 2 objets du type Polygone):
Et voici maintenant la classe Polygone (placée dans le même projet sous eclipse mais dans un autre fichier):
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
J'ai une erreur aux lignes suivantes:
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Cannot make a static reference to the non-static field polygoneA
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
Cannot make a static reference to the non-static field coordinatesA
Cannot make a static reference to the non-static field polygoneB
Cannot make a static reference to the non-static field coordinatesB
Quelqu'un peut-il ma'ider à résoudre ce problème svp? Faut-il importer un fichier dans l'autre? Comment faire?
Merci pour votre aide

 

 
		
		 
         
 

 
			
			



 Problème de création d'objets
 Problème de création d'objets
				 Répondre avec citation
  Répondre avec citation

 
			 
   

 Envoyé par gids01
 Envoyé par gids01
					
				 
 
Partager