Person Constructor



    Miguel Calle Contreras

    The Person class has a constructor that takes two arguments - a string name and an int age. The name property contains the string name of the person, and the age property contains the int age of the person.

    public Person(String name, int age) { = name;
        this.age = age;
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.