I know that all primitive types are objects and can be null in Apex
But is there a way to handle the null value when doing polymorphism ?
public class myClass{
public myClass(String name){
// handle input
}
public myClass(Integer num){
// handle input
}
}
new myClass(null);
I am getting the error below when trying to instantiate my class with a null value