wow this code has a lot of problems
1.
while(z.get_ant-ar() != "end")
this is a typo, should probably be
while(z.get_ant_ar() != "end")
2.
that while loop will never exit, because "z.get_ant_ar()" will never return "end"; count will keep incrementing; but when "count" gets to 3,
will be out of bounds
3.
ar[count] = z.get_ant_ar();
System.out.println(ar[count]);
it seems from these lines that "ar" should be a "String[]" instead of a "ant[]"
4.
the ant method get_ant_ar() always returns the literal string "ant". it sets the "ant" instance variable, but never uses it; perhaps you wanted to instead