Hi Guys
thanks for your time,
Tim, i have no idea how the Dog class is changing,
i have tried running the same programme in Netbeans
IDE, its giving correct output there,
problem is comming while running through JVM,
i am still unable to sort out the exception.