• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

How to split an arrayList at the spaces  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a pig latin translator assignment that is supposed to read in a text file, translate to pig latin and write to a file or display the output. As it is now it is only translating the last word of the text file. I can't figure out how to get it to read in each word to a string, translate, and then display each new word. I tried putting it into an arraylist but then I couldn't figure out how to split it at each space much less handle punctuation. Any help would be greatly appreciated.


}
 
Ranch Hand
Posts: 380
2
Fedora IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
Marshal
Posts: 64168
215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before you do anything about punctuation, etc., you would have to decide what you are doing about it. Are you keeping the punctuation unchanged? What do you mean about putting things in an arraylist (ArrayList, please, by the way)?
 
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!