bonjour, je debute en Java et je dois debugger un programme , je l'ai fait, je n'ai plus d'erreur de compil mais j'ai une erreur au lancement et je n'arrive pas a comprendre pourquoi :
java.lang.NoSuchMethodError: main
Exception in thread "main"
voici mon code :
Pouvez vous me dire ou est le probleme svp ?
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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 public class Box { private int width; private int height; private int depth; public Box (int w, int h , int d) { width = w ; height = h ; depth = d ; } public int getHeight() { return height; } public int getWidth() { return width; } public int getDepth() { return depth; } public int calculateVolume() { return height*width*depth; } public void main ( String args[]) { Box myBox = new Box(1, 1, 1); System.out.print(calculateVolume()); } }
merci d'avance
Partager