Здравствуйте, уважаемые форумчане! На мой взгляд, выполнено все согласно условию - 6 private полей. Тем не менее, валидатор ругается на то, что поля не private и количество - не 6. Подскажите, в чем проблема?
package com.javarush.task.task10.task1013;
/*
Конструкторы класса Human
*/
public class Solution {
public static void main(String[] args) {
}
public class Human {
private String name;
private String city;
private int iD;
private int age;
private int phoneNumber;
private int postCode;
public Human() {
}
public Human(int postCode) {
this.postCode = postCode;
}
public Human(String name) {
this.name = name;
}
public Human(String name, String city, int iD, int age, int phoneNumber, int postCode) {
this.name = name;
this.city = city;
this.iD = iD;
this.age = age;
this.phoneNumber = phoneNumber;
this.postCode = postCode;
}
public Human(String name, String city) {
this.name = name;
this.city = city;
}
public Human(int iD, int age) {
this.iD = iD;
this.age = age;
}
public Human(String name, String city, int iD, int age) {
this.name = name;
this.city = city;
this.iD = iD;
this.age = age;
}
public Human(String name, String city, int iD, int age, int phoneNumber) {
this.name = name;
this.city = city;
this.iD = iD;
this.age = age;
this.phoneNumber = phoneNumber;
}
public Human(String name, int iD, int phoneNumber) {
this.name = name;
this.iD = iD;
this.phoneNumber = phoneNumber;
}
public Human(String name, int phoneNumber) {
this.name = name;
this.phoneNumber = phoneNumber;
}
}
}