public static void main(String[] args) {

        Building building = new Building();

        //Human sanya = new Human("Sanya");

        //Human slava = new  Human("Slava");
//
//        building.addHuman(sanya);
//        building.addHuman(slava);
//
//        for (Human human:building) {
//            System.out.println(human);
//        }


        String name = "Sanya";
        int money = 14;
        //****
        name = null;
        //money = -200;
        //*****
        try {
            Human i1 = Human.createInstance(name);
            System.out.println("hum name: " + i1.getName());
        } catch(IllegalHumanNameException e) {
            System.out.println("Name Error!" + e.getMessage());
            //e.printStackTrace();
        } catch(Exception e) {
            System.out.println("Error");
        }

        name = "Sanya";
        money = -200;
        //*****
        try {
            Human i1 = Human.createInstance(name, -12);
            System.out.println("hum name: " + i1.getName());
        }   catch(IllegalHumanNameException | IllegalMoneyException e) {
            System.out.println("Human creation error!");
        }
        finally {
            System.out.println("Finally");
        }
    }