How to get store details in magento 2 object

How to get store details in magento 2 object:

Below code snippet will helpful to retrive the store information in magento 2.

Using object manager here am getting store details. We can also get the information via DI.

$store=$objectManager->create('Magento\Store\Model\Information');

$store = $objectManager->create('Magento\Store\Model\Store');

$storeInfo = $store->getStoreInformationObject($store);

$storeName = $storeInfo->getName();

$storePhone = $storeInfo->getPhone();

$storeCity = $storeInfo->getCity();

$storePostcode = $storeInfo->getPostcode();

Save Tree !! Save Earth!!