Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Re: Calling a print method from another class (printing array)

    I don't see anything in what you posted that asks the user for a value????
    numbers is an int array not an ArrayList.
    If you change the array to be an array of objects, you would replace the array...
  2. Re: Calling a print method from another class (printing array)

    You would use a loop like you posted in post #3
  3. Re: Calling a print method from another class (printing array)

    If you have an array of objects and the objects contain more than one value.
    Add a method to the object to return the value that you want to compare against.
    Then have your search routine ask each...
  4. Re: Calling a print method from another class (printing array)

    If the printMethod in the FirstClass does everything that needs to be done to print the array, you can call that method from the SecondClass to do the printing.
    If you need other things done in...
Results 1 to 4 of 4