Can I implement OnClickListener
and SurfaceHolder
like this :
public class MainActivity extends Activity implements SurfaceHolder.Callback,OnClickListener
Yes, in Java a class can implement many different interfaces.
This compensates the lack of multiple inheritance in Java, as opposed to e.g. C++ where multiple inheritance is allowed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With