Create a sObject dynamically

The following code provides a general example of how to create a sObject dynamically in apex.

Usage

This kind of function will be useful in creating general class.