I'm trying to set the string[] of object e1 but I keep getting an illegal start of expression
error. I'm new to Java and I have absolutely no idea what is wrong. Any help is appreciated.
public class Employeetest {
public static void main(String[] args) {
Employee e1 = new Employee();
e1.person ={"","","","",""};
e1.printInfo();
}
}
public class Employee {
String[] person ={"","","","",""};
public void printInfo() {
System.out.println("Name:" + person[0]);
System.out.println("Gender:" + person[1]);
System.out.println("Job Title:" + person[2]);
System.out.println("Organization:" + person[3]);
System.out.println("Birthday:" + person[4]);
}
}