passing an enum type as a parameter ??!
hello all.. I'm just wondering if its possible to pass an enum type as a parameter ??
this is my program. The last 2 lines in the constructor are not workin.. how can I pass the 2 enum types as parameters and assign them to the original enum values above ??
public class Person {
enum Sex { MALE, FEMALE }
enum Size {SMALL, MEDIUM, LARGE, X LARGE}
String name;
int age;
double money,
public Person (String name, int age, double money, Sex sex, Size size) {
this.name = name;
this.age = age;
this.money = money;
this.Sex = sex;
this.Size = size;
}
}
Thanks for the help.