User Profile

Collapse

Profile Sidebar

Collapse
Mr Smiggins
Mr Smiggins
Last Activity: Jan 4 '07, 11:31 PM
Joined: Jan 4 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Mr Smiggins
    replied to Removing spaces from an ArrayList
    in Java
    Well I'm certainly an idiot. It actually worked fine. Always a good idea not to start off with an empty array if you don't want to end up with one.
    See more | Go to post

    Leave a comment:


  • Mr Smiggins
    started a topic Removing spaces from an ArrayList
    in Java

    Removing spaces from an ArrayList

    I'm trying to make a method that removes all cells that are just spaces from an ArrayList. So far I have this:

    Code:
    public ArrayList removeSpace()
    	{
    		Iterator<String> it = array.iterator();
    			while (it.hasNext())
    			{
    				if (it.next().equals(" "))
    				{
    					it.remove();
    				}
    			}
    		return array;
    This unfortunately seems to return...
    See more | Go to post
No activity results to display
Show More
Working...