LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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,290

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


Reply



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:37 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration