string manupulation

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2007
Posts: 159
Reputation: mrjoli021 is an unknown quantity at this point 
Solved Threads: 0
mrjoli021 mrjoli021 is offline Offline
Junior Poster

string manupulation

 
0
  #1
Nov 13th, 2008
i have a file with 2 int's i need to assign them to a variables. the int's are separeated by a space. what method can i use to read each int separeate and then assign it to a variable.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 3,584
Reputation: jasimp has a spectacular aura about jasimp has a spectacular aura about jasimp has a spectacular aura about 
Solved Threads: 52
Featured Poster
jasimp's Avatar
jasimp jasimp is offline Offline
Senior Poster

Re: string manupulation

 
0
  #2
Nov 13th, 2008
Try going through the Scanner class. That should be sufficient for your purpose.
Last edited by jasimp; Nov 13th, 2008 at 4:43 pm.
"Argyou not with the hand you are dealt in cards or life." ---- Wizard and Glass
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,844
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 503
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: string manupulation

 
0
  #3
Nov 13th, 2008
You have a whole bunch of threads going. Please mark the ones that are solved "solved". We don't know which thread to respond to and we don't know whether someone else has posted a solution on another thread. It saves us all time, including you, if you don't have multiple threads on what appear to be the same subject. Thanks.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: string manupulation

 
0
  #4
Nov 14th, 2008
Originally Posted by jasimp View Post
Try going through the Scanner class. That should be sufficient for your purpose.
or read the entire line as a String and use substring and parsing to int's
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum


Views: 347 | Replies: 3
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC