1) You cannot extend two classes, for such function you should try using interfaces and implement them. Each interface can in turn extend one class for itself.
2) You cannot inherit booleans, boolean is a type, primitive type.
Instead, you should try instantiating and using the boolean variable, or make it static and call it as,
MainActivity.variable
For this reason, multilevel inheritance has been introduced so that you can use features of 2 or more classes.
http://beginnersbook.com/2013/05/java-inheritance-types/[
^]
class First {
}
class Second extends First {
}
class Third extends Second {
}
You can use
Third
and call functions and members inherited from
First
and
Second
class also.
Even boolean
.