In this post I am going to explain how to add customer address programmatically in magento 2.

1. Using Dependency Injection

Add below code snippet in Block class.

 

Related Read:  Magento 2 Tutorial: How to Disable Extensions in Magento 2?

2. Using Object Manager

 

 

Related Read:  How to Add Search Terms in Magento 2

Thats it. Enjoy Magento 2!!