Doubt regarding returns

Can we have two returns like

public String,int returnClass()
return String,int;

Is this java? If it is, you can’t. For contrast, in python you can.

1 Like

I think it’s Java. A workaround would be to return an array of objects (but unless you’re using the Object class, you shouldn’t return arrays with different data types).

1 Like