Does Apex support method return type overloading ?
I mean can I have a method in a class that return different type depending on it's Inputs ?
Does Apex support method return type overloading ?
I mean can I have a method in a class that return different type depending on it's Inputs ?
Best Answer
Yes, if the method signature is different you can have a different return type
In a class you can have
But you can't have
A working example :