i have a class person with a enum Gender and in the Person Constructor i want to initialize the gender and age. How can i instantiate a new Person in main() method?
class Person {
public enum Gender { M,F }
int age;
Gender gender;
public Person(int age, Gender gender) {
this.age=age; this.gender=gender;
}
}
public static void main(String[] args) {
Person p = new Person(20, ?);
}
Best Regards.