Is there any way in java, to create a method, which is expecting two different varargs? I know, with the same object kind it isn\'t possible because the compiler does\'nt kn
You can do something like this, then you can cast and add additional logic inside that method.
public void doSomething(Object... stringOrIntValues) { ... ... }
And use this method like so:
doSomething(stringValue1, stringValue2, intValue1, intValue2, intValue3);