If I would have a variable a declared by A a and a method m with void m(B b). Is there any way that calling m(a)
a
A a
m
void m(B b)
m(a)
If A extends B, it can be passed as argument to that function. If not and A contains values suitable for B you have to create an instance of B and fill it with the required values of the instance of A.
A
B