I have been programming with VC++ for many years. Now I would like to extend
my knowledge to Java. I'd like to know what "Extends" and "Implements"
keywords in the class declaration do... Thanks in advance
Jack
Luc The Perverse - 22 Nov 2005 10:03 GMT
>I have been programming with VC++ for many years. Now I would like to
>extend my knowledge to Java. I'd like to know what "Extends" and
>"Implements" keywords in the class declaration do... Thanks in advance
> Jack
Extends is just standard class inheritance.
Implements is similar, but only abstract functions can be derived (no
attributes.)
This question seems to be jumping into the middle, however. I suggest you
get a Java book and start from the beginning. If you all ready know how to
program, you should be able to go very quickly through any tutorial or book.
--
LTP
:)
Jacky Luk - 22 Nov 2005 10:46 GMT
Thank you so much
Jack
"Luc The Perverse" <sll_noSpamlicious_z_XXX_m@cc.usu.edu> ¼¶¼g©ó¶l¥ó·s»D:4382ecda$0$8246$3a2ecee9@news.csolutions.net...
>>I have been programming with VC++ for many years. Now I would like to
>>extend my knowledge to Java. I'd like to know what "Extends" and
[quoted text clipped - 15 lines]
>
> :)
Roedy Green - 22 Nov 2005 13:34 GMT
>I have been programming with VC++ for many years. Now I would like to extend
>my knowledge to Java. I'd like to know what "Extends" and "Implements"
>keywords in the class declaration do... Thanks in advance
see http://mindprod.com/gettingstarted.html
You will need a text book for that. Read a text first before posting
any more questions, or you will find people refusing to answer you
later when you ask questions not in every elementary textbook.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Bhupendra - 23 Nov 2005 12:12 GMT
extends:-
in java extends keyword is used for inheritence from only one class
example
public class demo extends Frame \\\legal declaration
{ ......... }
public class demo extends Frame, Applet \\\illegal declaration
{ ......... }
implementation Keyword: -
The implements keyword is used for multiple inheritence in java, but
you can only implement only interface (which same as like abstract
classes in C++ but only difference is here that no methods should have
body in interface.
example:
inteface demoInterface1
{
public void demoMethod(int demoVar);
}
inteface demoInterface2
{
public void demoMethod(int demoVar);
}
public class demo extends Frame implements demoInterface1,
demoInterface2
{.................................}
Here you are extending Frame class and implementing multiple interface
demoInteface1, demoInteface2 but the methods body of the the interface
methods will be written in class where the inteface has been
implemented.