Method "XXX" with signature "XXX" is not applicable on this object
Running into a problem with message "method 'xx' with signature 'xx'
Is not applicable on this object ", still trying to figure it out.
Fixed.
In the original code, there are three classes and Class A extends Class C, Class B extends Class C.
There are two methods in another class.
Public void example1 (C)
{
Example2 (C );
}
Private void example2 (C)
{
}
Because in the example1 method, the parameter C is a instance of,
When callmethod example2, the method example2 with signature C is not
Applicable on this object.
The code after my fix:
Public void example1 (C)
{
If (C instances)
Example2 (a) C );
} Else if (C instances B)
{
Example3 (B) C );
}
// Changed the parameter from C to
Private void example2 ()
{
}
/// Added another method example3 with the parameter B
Private void example3 (B)
{
}
My website www.threes.cn