One solution can be as follows.
The function can be defined as follows (the number/type of inputs can be arbitrage)
static List<Object> multiTypeInputOut (int a, double b, String c, List<Object> d)
{
List<Object> multiTypes = new ArrayList<>();
multiTypes.add(a);
multiTypes.add(b);
multiTypes.add(c);
multiTypes.add(d);
return multiTypes;
}
When call such method/function, the example will be as follows (only the order of the types returned should be remembered and set correctly):
List<Object> HelloWorldStrList = new ArrayList<Object>(Arrays.asList("Welcome", "Hello", "World"));
List<Object> multiType = multiTypeInputOut (1, 2.1, "HelloWorld", HelloWorldStrList);
int entry1 = (int) multiType.get(0);
double entry2 = (double) multiType.get(1);
String entry3 = (String) multiType.get(2);
List<Object> entry4 = (List<Object>) multiType.get(3);