| Author |
interface problem
|
deepesh mathur
Ranch Hand
Joined: Aug 13, 2007
Posts: 39
|
|
hi all, i am writing this post to ask that: 1.is it necessary for an interface to have an concrete class(non abstract)implementation? what i mean to say is that can we have a source file compiled with only interfaces and it's implementing abstract classes without a non abstract class??? 2.is it the same case with a class extending an abstract class??? i.e. is it necessary to give an non abstract class extending an abstract class to compile code correctly??? i know i am a bit confused so kindly help...
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
Have you tried this? Compilation is one thing. Instantiation is another.
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
deepesh mathur
Ranch Hand
Joined: Aug 13, 2007
Posts: 39
|
|
|
sorry but actually i can't get you really ...
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16695
|
|
Originally posted by deepesh mathur: sorry but actually i can't get you really ...
Basically, Marc is saying... Yes, it will compile. But what are you going to do with interfaces that don't have any implementations? Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
 |
|
|
subject: interface problem
|
|
|