A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Jun 20, 2006
Jun 20, 2006 01:43:00
can an anonymous class extend a class or implement an interface?
please explain to me.
i am new to
Joined: Oct 13, 2005
Jun 20, 2006 02:01:00
Welcome to the Ranch.
The short answer to both your questions is yes. In fact if it doesn't do one or the other, you have to give it a name, and it ceases to be anonymous.
You will find this is discussed many a time on the Ranch; different people have different opinions. Look at
this thread in the advanced forum,
I agree. Here's the link:
subject: anonymous classes
object of an interface? Hows possible
Is it possible to create a class like this
What is this technique called?
Passing an object to a method.
Anonymous class ???
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014