Подскажите, что не так ? Пройти проверку не могу из-за ошибки по синтаксису, видимо.
Ругается на фигурную скобку, но без нее же .... выпадает масса других ошибок.
package com.javarush.task.task05.task0504;
/*
Трикотаж
*/
public class Solution {
public static void main(String[] args) {
//напишите тут ваш код
Cat cat1 = new Cat();
Cat cat2 = new Cat();
Cat cat3 = new Cat();
}
public void cat1(String name, int age, int weight, int strength) {
this.name = "Vaska";
this.age = 1;
this.weight = 1;
this. strength = 1;
}
public void cat2(String name, int age, int weight, int strength) {
this.name = "Petka";
this.age = 1;
this.weight = 1;
this. strength = 1;
}
public void cat3(String name, int age, int weight, int strength) {
this.name = "Ivanko";
this.age = 1;
this.weight = 1;
this. strength = 1;
}
}
public static class Cat {
private String name;
private int age;
private int weight;
private int strength;
public Cat(String name, int age, int weight, int strength) {
this.name = name;
this.age = age;
this.weight = weight;
this.strength = strength;
}
}
}