public AccountControllerExtension(ApexPages.StandardController stdController){
// Get the record of sObject (e.g. Account, Contact etc.) by using the method "getRecord()" of StandardController
sObject sObjectRecord = stdController.getRecord();
// Get the object type specifically by using Apex sObject Describe call
// In this case it will be Account
String objectType = sObjectRecord.getSObjectType().getDescribe().getName();
// Verify the Object Type
System.Debug('>>Object Type<<'+objectType);
}
// Get the record of sObject (e.g. Account, Contact etc.) by using the method "getRecord()" of StandardController
sObject sObjectRecord = stdController.getRecord();
// Get the object type specifically by using Apex sObject Describe call
// In this case it will be Account
String objectType = sObjectRecord.getSObjectType().getDescribe().getName();
// Verify the Object Type
System.Debug('>>Object Type<<'+objectType);
}