package Stats;
public class Players {
private String name;
private int RIT;
private int TIR;
private int PAS;
private int REG;
private int DEF;
private int FIS;
private int MED;
public Players (String name, int RIT, int TIR, int PAS, int REG,
int DEF, int FIS, int MED) {
this.name= name;
this.RIT = RIT;
this.TIR = TIR;
this.PAS = PAS;
this.REG = REG;
this.DEF = DEF;
this.FIS = FIS;
MEDIA = MED;
}
public static void main (String[] args) {
Players player1 = new Players ("aa", 5,3,7,1,7,9,8);
System.out.println(player1);
}
}
I'm trying to get all the variables from the constructor with the println but only prints "Stats.Players@14c3d7e" and if I put println (name + "\ n" + RIT + ....); He says that you can not because he is not static. What can I do?