This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Overriding and Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Overriding and Exceptions" Watch "Overriding and Exceptions" New topic
Author

Overriding and Exceptions

faiza haris
Ranch Hand

Joined: Oct 17, 2000
Posts: 173
The problem with the code is that I want to try overriding in subclass with exceptions, and my instance
of subclass is giving me problems???Can someone help me with the code???

Faiza, I added UBB CODE tags to your source code. You can learn about UBB codes here. �Mapraputa
[This message has been edited by Mapraputa Is (edited November 04, 2000).]
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Faiza,
Assuming your source file name is "divkabaita.java", you just have to move the <code>public</code> modifier from the divby0 class to the divkabaita class.
Hope this solves the pb.
Cheers,
Beno�t
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Overriding and Exceptions
 
It's not a secret anymore!