This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Remove a char from ArrayList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Remove a char from ArrayList" Watch "Remove a char from ArrayList" New topic
Author

Remove a char from ArrayList

Joana Silva
Greenhorn

Joined: Feb 28, 2009
Posts: 5
hi I have this arraylist ArrayList<String> orca = new ArrayList<String>();

Each index contais this:

###########################
#...........O.............#
#.######.R######.H#######.#
#.#......#...........#....#
#O###....#...........#....#
#.#.....G#...........#....#
#.#.....O.######.....#....#
#.................B....O..#
###########################

How can I deleteeverything besides # ?
Oleg Tikhonov
Ranch Hand

Joined: Aug 02, 2008
Posts: 55
Hello,
may be you want to use a String library

Oleg.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44525
    
  34
You cannot delete from Strings at all.
You can create new Strings with methods of the String class (eg replaceAll) or remove parts of the text with the java.lang.StringBuilder class, however.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Remove a char from ArrayList
 
It's not a secret anymore!