New in Java (Map and Set)
<p>Can Any help me and Check my answer</p>

<p><strong>(a)</strong> Declare a private instance variable (Attribute) called HouseMap which should hold an unsorted map with integer keys and string values. </p>

<pre><code>Private Map&lt; Integer, String&gt; HouseMap = new HashMap&lt;Integer, String&gt;();
</code></pre>

<p><strong>(b)</strong> Write a zero-argument constructor of HouseCatalogue that initializes HouseMap to an empty map. </p>

<pre><code>houseMap = new HashMap&lt;Integer, String&gt;();
</code></pre>

<p><strong>(c)</strong> Write an instance method called addHouse() for the HouseCatalogue class that takes no arguments, and returns no value. This method should simply enter the four entries shown above into the HouseMap. </p>

<pre><code>Public void addHouse()
{
    HouseMap.put(101," adison Sas") ;
    HouseMap.put(103," FourSeasons") ;
    HouseMap.put(105," Hayat Regency "); 
    HouseMap.put(107," Concord al-Salam ") ;
}       
</code></pre>

<p><strong>(d)</strong> Write an instance method called printHouse() for the HouseCatalogue class that takes an integer argument, and return a string value. This method should print the value (House name) of the area code that is equal to integer argument and return it. Otherwise it will return null.                                   </p>

<pre><code>Public string printHouse( int area)
{
    for(Integer eachcode : HouseMap.keySet()) 
    { 
        if ( HouseMap.keySet()== area)
        {
            System.out.println("House name is"+ HouseMap.get(eachcode));
        }
    }
}
</code></pre>

<p>or </p>

<pre><code>public static void printHouse( int area)
{ 
    for(Map.Entry&lt;Integer,String&gt; entry : houseMap.entrySet()) 
    {
        if (entry.getKey().equals(area)) 
        {
            System.out.println("House name is"+ entry.getValue());   
            //return entry.getValue();  //  return it      
        }   
    }
}
</code></pre>
