Home arrow static arrow Java Programming [Archive] - How detect for a blank line/carraige return
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - How detect for a blank line/carraige return
This topic has 3 replies on 1 page.

Posts:1
Registered: 7/30/04
How detect for a blank line/carraige return   
Jul 30, 2004 7:07 PM



 
hi all,
i have written a program , where one choice Y or N is to be given by the user ,now if the user does not enter y/n and simply pressed the enter key how do i detect it(which is like entering nothing/blank line)
thanx
ranbir.
 

Posts:648
Registered: 6/26/00
Re: How detect for a blank line/carraige return   
Jul 30, 2004 9:39 PM (reply 1 of 3)



 
Tell me how you detect the "Y" or "N" now, then I tell you how to detect the "".

--
 

Posts:648
Registered: 6/26/00
Re: How detect for a blank line/carraige return   
Jul 30, 2004 9:41 PM (reply 2 of 3)



 
oh, that is not fair, I already tell you the answer.

--
 

Posts:54
Registered: 11/12/03
Re: How detect for a blank line/carraige return   
Jul 31, 2004 3:58 AM (reply 3 of 3)



 

Hi,

Another idea, you can check for escape character \r, \n

Best of luck,
Rajneet Singh
 
This topic has 3 replies on 1 page.