Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java question



On Thu, Jun 14, 2001 at 04:57:30PM +0900, Stephen J. Turnbull wrote:
> >>>>> "Thomas" == Thomas O'Dowd <tom@example.com> writes:
> 
>     Thomas> this is because javac just sees that an exception may be
>     Thomas> thrown during parseInt() and someInt may never be defined,
>     Thomas> although we are looping to prevent that anyway
> 
> Note that javac is correct here, as you are not catching all possible
> exceptions.  Suppose the user SIGINTs, or the string creation routine
> ENOMEM's, for example.

This doesn't effect things here though. If a runtimeexception is thrown,
and you don't catch it, your program will pop out to a stacktrace
and if you do catch it, then you can handle it appriopriately. In this
particular case, javac is just trying to help out, pointing out a potential
programming error where a variable might be used uninitialised. It isn't
needed though in this case as it will never happen. Still, I like the
fact that it checks these simple errors for you. Yes, linux can run java
(see, this post is on topic :)

Tom.
-- 
Thomas O'Dowd. - Nooping - http://nooper.com
tom@example.com - Testing - http://nooper.co.jp/labs


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links