lo.
first time posting on stack.
im trying too just do some past exam questions but its proving difficult so sorry if this sounds noobish.
i need too pass a 1d array that isnt defined in a method. i need too create a testclass then make the arrays myself.
im just not sure about the syntax.
example heres my company class
public class Company
{
String name;
String address;
Employee employeeList[] = new Employee[3];
public Company (String name, String address ,
Employee employeeList, String jobTitle )
{
this.name = name;
this.address = address;
}
public void printDetails()
{
for(int i = 0; i>employeeList.length;i++)
{
System.out.println(" The companys name is " + name);
System.out.println(" The Companys Address is "+ address);
System.out.println("The List of employees are " + employeeList[i].name);
System.out.println("The Titles of These Employees are " + employeeList[i].jobTitle);
}
}
}
but my testclass is where the problem lies.
where do i go from here with how too put arrays(employees) into it,
public class TestCompany
{
public static void main(String[] args)
{ employees?
Company hungryBear = new Company("hungryBear ", "Those weird apartments ",////// );
}
}
help me o guru's of computer wisdom.