problem in util.Scanner class

Joseph D. Darcy Joe.Darcy at Sun.COM
Fri Mar 27 11:33:12 PDT 2009


Florian Weimer wrote:
> * sagar priyadarshi:
>
>   
>> But when I use the same method findInLine() with an argument "." ie
>> findInLine(".") the output which I get is the whole line itself even when
>> the line of text does not contain a dot (.)
>>     
>
> The findInline(String) methods takes a regular expression argument,
> not a string argument.  You have to write findInLine("\\."), or use
> Pattern.quote(String).
>
> The jdk6-dev mailing list is about development of OpenJDK itself, and
> not intended for questions about using the JDK to write software.
> However, to my knowledge, Sun does not host any general-purpose
> mailing lists for Java programming.
>   

There are many fine forums for this kind of question:

    http://forums.sun.com/index.jspa

-Joe



More information about the jdk6-dev mailing list