public class Artifact {
int number;
String culture;
int centure;
static int count = 0;
public Artifact(int number) {
count++;
this.number = number;
}
public Artifact(int number, String culture) {
count++;
this.number = number;
this.culture = culture;
}
public Artifact(int number, String culture, int centure) {
count++;
this.number = number;
this.culture = culture;
this.centure = centure;
}
public static void main(String[] args) {
Artifact dada = new Artifact(1);
Artifact fafa = new Artifact(2,"assa");
Artifact gaga = new Artifact(3, "dasa", 32);
System.out.print(dada + " " + fafa + " " + gaga);
}
}
Юля Лобас
26 уровень
Почему не работает? Выдает что то странное. и почему то требует для каждого вида артефактов описывать переменные разве так должно быть?
Обсуждается
Комментарии
- популярные
- новые
- старые
Для того, чтобы оставить комментарий Вы должны авторизоваться
У этой страницы еще нет ни одного комментария