This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hey, Aadhar , it would have been better if you have provided us the output Anyways, this is my understanding of your program:
Whwn you call new Car(), first constructor of superclass Vehicle runs and prints Vehicle.Then constructor of class Vehicle runs and prints Car.
Now you do out.flush() But out is an ObjectOutputStream, so Runtime environment tries to serealize the Car object. But since Car doesn't implement Serializable, you get the Exception: NotSerializableException : Car