java bufferedReader question, please help.?

2012-11-26 8:24 am
I'm using bufferedReader in java, I want to say,

if it hasNextLine, then print "helloworld" (but without the reader progress to the next line).

How can I do this? Thank u very much. Please provide me codes or syntax if u can.
Thanks.

回答 (1)

2012-11-26 10:06 am
✔ 最佳答案
if(bufferedReader.nextLine() != null)
{
system.out.println("hello world");
}


收錄日期: 2021-05-01 14:45:46
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20121126002420AAyrVVz

檢視 Wayback Machine 備份