Ever wondered how to find Salesforce Object name with Record Id?

Here is solution,

// pass record Id for which you want to find sObject Name
Id recordId = 'a099000000h6Nw9'; 
// recordId.getSObjectType() is responsible for getting sObject Name
system.debug(recordId.getSObjectType());

Happy Coding!!!