In magento2, we have use object manager:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
and use get() and create() method
$cookieManager = $objectManager->get('{MyClassName}')
$cookieManager = $objectManager->create({MyClassName})
Now, i want to know
- what is different between this two methods?
- When and where we need to use this two methods?