Arrays of References Quiz
By Mickey Arnold
starstarstarstarstar
Last updated 10 months ago
13 Questions
DIRECTIONS : Complete each of the empty methods below.
public class Chicken{
//data not shown
public Chicken(String n, int a){
//code not shown
}
//other methods now shown
}
public class Chickens
{
private Chicken[] chicks;
public Chickens(int size)
{
//Enter code here 1
}
public void add(int spot, Chicken chick)
{
//Enter code here 2
}
public String toString()
{
return Arrays.toString(chicks);
}
}
public class ArrayOfReferencesQuiz2A
{
public static void main(String args[]) throws Exception
{
//Enter code here 3
}
}