Results 1 to 2 of 2
  1. #1
    dinosaur1993 is offline Member
    Join Date
    Mar 2014
    Posts
    11
    Rep Power
    0

    Default Arraylist - Methods

    How do I code this without having the need to use iterator?

    Code a Java method that accepts an ArrayList of integers and an integer. The method should delete all elements in the array list exactly divisible by the integer and return the number of remaining elements.

    Cheers!

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default Re: Arraylist - Methods

    Use a normal for loop and loop backwards.

Similar Threads

  1. Replies: 5
    Last Post: 03-09-2014, 04:50 PM
  2. Replies: 12
    Last Post: 11-07-2013, 02:42 AM
  3. Need help with get/set & arrayList in multiple methods
    By FiasseKrystella in forum New To Java
    Replies: 4
    Last Post: 08-20-2011, 08:39 PM
  4. Replies: 12
    Last Post: 07-07-2011, 08:49 PM
  5. Replies: 7
    Last Post: 11-22-2010, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •