473,473 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

can classes extend interfaces?

1 New Member
it is true or false? please
Jun 11 '07 #1
3 13413
blazedaces
284 Contributor
it is true or false? please
They impliment them... what do you mean? It kind of wouldn't make sense for them to extend an interface... I don't know, maybe someone can explain it better then I can...

-blazed
Jun 12 '07 #2
upstone
2 New Member
can classes extend interfaces?
--------------------------------------------------------------------------------

it is true or false? please

classes can not extend interfaces.ya but they can implement interfaces.
when we use the term extend in java it means we are inheriting all the features that a class possess and adding some new feature to the derived class
although when we extend an abstract class we use the functionality of the parent class as well as we define the functionality of the abstract methods .in case of implemeting an interface we have to define all the methods declared in the interface .
this is the reason why in case of creating a derived class from another class its called extendiing while in case of interfaces it is called implementation.
more or less these two words are similar in java but cant be used interchangably.
Jun 12 '07 #3
r035198x
13,262 MVP
can classes extend interfaces?
--------------------------------------------------------------------------------

it is true or false? please

classes can not extend interfaces.ya but they can implement interfaces.
when we use the term extend in java it means we are inheriting all the features that a class possess and adding some new feature to the derived class
although when we extend an abstract class we use the functionality of the parent class as well as we define the functionality of the abstract methods .in case of implemeting an interface we have to define all the methods declared in the interface .
this is the reason why in case of creating a derived class from another class its called extendiing while in case of interfaces it is called implementation.
more or less these two words are similar in java but cant be used interchangably.
Why don't you try it on the compiler and see what happens.
P.S When learning Java, the compiler is your friend.
Jun 12 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Colin Goudie | last post by:
Hi, I'm hacking around coding a 3D Engine and I'm stumped with a concept. Currently my engine is in a dll and it contains interfaces such as IRenderSystem, IRenderDriver etc.. that are...
9
by: Gomaw Beoyr | last post by:
Two question about the "partial classes" (in the next wersion of ..NET). Question 1 ========== Will partial classes (in the next version of C#) have to be declared "partial" in ALL places. ...
30
by: Frank Rizzo | last post by:
We are having one of those religious debates at work: Interfaces vs Classes. My take is that Classes give you more flexibility. You can enforce a contract on the descendant classes by marking...
7
by: tshad | last post by:
I am trying to figure out when it is best to use Interfaces and when to use classes. The only reason I can figure out to use interface is if you need to implement multiple interfaces. The...
5
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, I am actually a VB.Net guy, but I have worked somewhat with C++ and C#. I just want to ask about the relationship between Abstract Classes and Interfaces. My first question is if...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.