Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
Carey Brown wrote:I read the question differently. Given a super-class and some of its sub-classes, how would you make an array and populate it with each of the sub-classes...
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Campbell Ritchie wrote:What has this got to do with Throwable as in the first post?
Carey Brown wrote:I got the feeling that "Throwable" was just something that the OP injected into the assignment because it was the first example of inheritance that came to mind.
Carey Brown wrote:The OP seems to have left the building. Shrest, are you still with us?
Why did you pick "Exception"? Was that actually part of the requirements? Could have chosen something else? If you use Exception do you plan on finding all sub-classes, or just demonstrate with just a couple?Shrest Burra wrote:
Carey Brown wrote:I got the feeling that "Throwable" was just something that the OP injected into the assignment because it was the first example of inheritance that came to mind.
Yes, I meant Exception instead of Throwable. Sorry for the inconvenience and misunderstanding
Carey Brown wrote:
Why did you pick "Exception"? Was that actually part of the requirements? Could have chosen something else? If you use Exception do you plan on finding all sub-classes, or just demonstrate with just a couple?Shrest Burra wrote:
Carey Brown wrote:I got the feeling that "Throwable" was just something that the OP injected into the assignment because it was the first example of inheritance that came to mind.
Yes, I meant Exception instead of Throwable. Sorry for the inconvenience and misunderstanding
Look at the documentation and the TREE heading at the top of the page. Search for java.lang.Exception and scroll down until the bullets move back to the left. There are 466 classes shown there.Shrest Burra wrote:. . . classes that extend "Exception" - I want ones I defined and ones that were pre-defined in the JRE.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |