A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
Extending a class
Joined: Feb 12, 2010
Jun 09, 2010 08:29:16
How many ways can we extend a class ?
Can i say that we can extend a class in two ways :
1. using extends
2. using anonymous inner class
Joined: Jul 29, 2008
Jun 09, 2010 09:25:40
You can extend an exception class as the same way as you extend any other class.
An anonymous inner class implicitly extends another class - so it can be used.
Author of ExamLab
- a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like?
How to Ask a Question
Joined: Jun 08, 2010
Jun 10, 2010 01:42:37
yes ofcourse you can extend a class using extends ...
anonymous innner classes serve as an implicit datatype for the class they are constructed in ... having access to all its (data/method) members.
I agree. Here's the link:
subject: Extending a class
Aggregation And Inheritence
Question from K&B Chapter 5
Doubt in TagSupport (Classic Tag)
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015