Distribute method calls

Report a typo

You have a method toString(...) in two overloaded forms with unknown implementations:

public static String toString(long num) {
    return // some string
}
    
public static String toString(int num) {
    return // some string
}

Distribute different method calls by the suitable methods (none of them might be suitable).

Choose one option for each row
toString(int num)toString(long num)None of these
float val = 2F; toString(val);
long val = 2L; toString(val);
int val = 2; toString(val);
byte val = 2; toString(val);
char val = 2; toString(val);
double val = 2; toString(val);
___

Create a free account to access the full topic