Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Thread: Need help!!

    by Norm
    Replies
    10
    Views
    2,022

    Re: Need help!!

    I assume you are asking how to define a class's toString() method.
    Read the API doc for Object class's toString method.
    For the Ant class, say you want to see some of its instance variables.

    ...
  2. Thread: Need help!!

    by Norm
    Replies
    10
    Views
    2,022

    Re: Need help!!

    System.out.println(ant);
    If that is the statement that you must use to print out the contents of an Ant instance and you are not allowed to add a toString() method to your class, then the output...
Results 1 to 2 of 2