bonjour
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
 
package javaapplication1;
public class Tuna
{
    private int month;
    private int day;
    private int year;
 
    public tuna(int m,int d,int y)
    {
        month=m;
        day=d;
        year=y;
        System.out.printf("The constructor for this is%s\n",this);
    }
    public String toString()
    {
        return String.format("%d/%d%d%d",month,day,year);
 
    }
}
 
package javaapplication1;
public class Apples
{
 public static void main(String[]args)
 {
     Tuna TunaObject=new Tuna("4,5,6");
 
 }
}
en compilant ce programme j'ai erreur suivantes:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - cannot find symbol
symbol: constructor Tuna(java.lang.String)
location: class javaapplication1.Tuna
at javaapplication1.Apples.main(Apples.java:7)
Java Result: 1

les lignes suivantes sont soulignés
public tuna(int m,int d,int y)
Tuna TunaObject=new Tuna("4,5,6");

aidez moi s'il vous plaît