I have multiple custom objects that need to be added to a list, So I just wanted to know if there is a better way, instead of having to hardcode each custom object and having multiple conditional statements.
SObject behaves like a map, meaning you can use .put() method like this.
List<SObject> sObjects = new List<SObject>();
Opportunity o = new Opportunity();
Lead l = new Lead();