Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.help Subject: Re: Help needed. Date: Tue, 26 Jul 2011 17:13:41 -0700 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <37f0537b-a064-4b12-9b6f-c104df52f4ba@k15g2000yqd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 27 Jul 2011 00:13:44 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="30526"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sSyqWTzbbhsJb4+cTn6VhYbjhvFc+ids=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 In-Reply-To: <37f0537b-a064-4b12-9b6f-c104df52f4ba@k15g2000yqd.googlegroups.com> Cancel-Lock: sha1:5BmjYE68j19MON6UACpXBcCTJSM= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.help:901 On 7/26/2011 3:47 PM, neil furnival wrote: > Exception in thread "main" java.lang.NullPointerException > reply = myScanner.findInLine(".").charAt(0); You should learn how to debug your own programs, it's an important part of programming. My guess is in the line above the pattern "." was not found and findInlIne() returned null: "If no such pattern is detected in the input up to the next line separator, then null is returned" I'll let you discover how to verify that this is indeed the problem, and what to do about it.