I am using a library from others, which i cannot change. Now I found one API has been changed.
Previous version 1:
int api_it(int a, int b)
The new version 2:
int api_it(int a, int b, int c, int d)
I was asked to support both versions. I thought I could use this (I am still using the previous jar file),
if( version == 1 )
api_it(a, b);
else
api_it(a,b,0,0);
There is the compile error for sure. I thought it not possible to include 2 versions of same library.
Is there any way to solve it? Any suggestion would be appreciated. Thanks!