Getting object name using object ID
Use Following method to get the SObjectType
Id someId = '00590000000eF8z';
System.debug(someId.getSObjectType());
Output :
User
Use Following method to get the SObjectType
Id someId = '00590000000eF8z';
System.debug(someId.getSObjectType());
Output :
User