LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-09-2005, 12:23 AM   #1
KissDaFeetOfSean
LQ Newbie
 
Registered: Jun 2005
Posts: 27

Rep: Reputation: 15
Method readLine() in Java...help


Hello,
I am new to programming and confused. Could someone please help me?
For the class BufferedReader, it has a method readLine (), which reads up to the newline character and returns that String; however, I would like to have method that would read up to some alternate character such as whitespace. Is there any way or method to do this in Java? Thanks.
 
Old 09-09-2005, 12:41 AM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,111

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Depending on what exactly you're trying to do, I'd read in the line and then tokenize it with a StringTokenizer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java newbie question method headers and if statements dflan98783 Programming 6 02-21-2007 11:18 PM
[JAVA - JLabel] executing a method based on contents of the variable linux_ub Programming 1 08-12-2004 09:50 AM
[java] Method signature precision pycoucou Programming 6 06-20-2004 11:31 AM
how do you reload the 'main' method in Java? ludeKing Programming 1 05-29-2004 10:22 PM
Java help (accessing array elemonts from another class or method) Tru_Messiah Programming 6 05-14-2004 09:20 AM


All times are GMT -5. The time now is 01:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration