Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to extends two class Android activity?

Tags:

java

android

I want to-->

class mainactivity extends ListActivity,MapActivity{ }

It's possible???

class mainactivity extends Any java class1,Any java Class2{ }

anyone possible??

like image 750
Rohit k Avatar asked Dec 09 '22 05:12

Rohit k


2 Answers

you can't . java doesn't let that type of polymorphism . You must use implements for interfaces .

Read this

like image 83
A.Quiroga Avatar answered Dec 24 '22 05:12

A.Quiroga


No it's not possible because you can not extend more than one class but you can implement more than one interface which is not of any use here.

like image 39
Android Killer Avatar answered Dec 24 '22 04:12

Android Killer