View Full Version : java implementing question

03-15-2004, 03:16 PM
i am making an applet that requieres i implement Runnable as well as KeyListener...

is it possible to go something like:

class Whatever implements Runnable implements KeyListener{


03-15-2004, 04:00 PM
Yes, but your syntax is a bit off:

class Whatever implements Runnable, KeyListener{

As long as you make sure to implement all the necesary methods (but I guess you already know that), you'll be fine.
Multiple "implements" is exactly the reason they have interfaces in Java, so you wouldn't need multiple inheritance (it's safer using interfaces).


03-15-2004, 06:47 PM
again, shmoove,

thanks. your a helpful person

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum