Depending on what you need really there could be a simple solution. You cannot extend from more than one class in java, but if you needn't your class have both types(the types of both classes) and you just need their functionality, the best way to get it is to create a variable that instance one of the two types and extends the other one.
public class MyClass extends FirstClass{
SecondClass variable;
public MyClass(){
variable = new SecondClass();
}
If you need to use both classes as if you where inside of them because you want to access to private variables or methods, create another class that only extends from one of them and create other functions that allow you to use that private functionality. Then you can instanciate that class instead of the class you wanted to extend from.