I am attempting to use a variable length argument in my constructor, however I get the error messages:
'Incompatible types string cannot be converted to int'
Illegal start of operation, ';' expected
public class Personnel { private String pname; private String rank; private String certs []; public static int totalPersonnel = 0; public Personnel(String name, String rank, String... certs) { this.pname = name; this.rank = rank; this.certs = certs; incrPersonnel(); } public static void incrPersonnel(){ totalPersonnel++; } public static void main(String myArgs[]){ Personnel Alex = new Personnel ("Alex", "CPT", ["none"] );
}
}