aspose file tools*
The moose likes Beginning Java and the fly likes help with programing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "help with programing" Watch "help with programing" New topic
Author

help with programing

rick dog
Greenhorn

Joined: Mar 12, 2010
Posts: 1
I am trying to put spaces in a string where 123456 would become 1 2 3 4 5 6
Matt Cartwright
Ranch Hand

Joined: Aug 25, 2008
Posts: 149

well, depends on how those numbers are provided....

I basically can think of two ways doing it:






hope that helps
Matt
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18988
    
  40


I am assuming that this is a homework problem, so... what have you done so far? and what issues have you run into?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Matt Cartwright
Ranch Hand

Joined: Aug 25, 2008
Posts: 149

Sorry Rick, you said String. I didn't read carefully enough.
What about a loop and charAt() ?

I sure do have a solution for that.

So, is it homework?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10522
    
    9

rick dog wrote:

Please check your private messages for an important administrative matter


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39826
    
  28
You should always use a thread subject which tells us what your question is.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help with programing