On Mar 24, 9:22 am, "Mahesh N Gidwani" <[email protected]> wrote: > Greetings > > I am working through the lab 1007 - Exercise 1.3 "Experience various > Exceptions". > > For most of the radio buttons, the java.lang.NullPointerException is > displayed. > > I was expecting different exceptions being caught, for each of the radio > buttons. > > In looking through the code, I have noticed that an array "private double[] > a;" is declared but I do not see any place where the array is initialized. > > Am I missing something? I will appreciate your comments. I am at this exercise too. I experienced same as you. So, I initialise the array and manage to get an <ArrayIndexOutOfBoundsException> for <arrayBoundsButton> source.
Unfortunately, it did not issue anything for <divideByZeroButton>, <negSqrtButton> and <overflowButton>. The code fragments look illegal, but did not issue any exception. Why? > > Thanks > > Mahesh --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
