Best programming practice to get a value from a list
<p>I am developing and android application using Java.
I need my application to get the phone prefix from Country code.</p>

<p>Say for example, if the country code is US, it should return back prefix as "+1"
in case of code IN, it should return back "+91", so on and so forth.</p>

<p>This can be achieved by having a function with if-else block as follows:</p>

<pre><code>String getPrefix(String iso){
    String prefix = "";
    if(iso.equalsIgnoreCase("AD"))          prefix = "376";
    else if(iso.equalsIgnoreCase("AE"))     prefix = "971";
    else if(iso.equalsIgnoreCase("AF"))     prefix = "93";
    else if(iso.equalsIgnoreCase("AG"))     prefix = "268";
    else if(iso.equalsIgnoreCase("AI"))     prefix = "264";
    ....
    ....
    return prefix;
    }
</code></pre>

<p>Or we can have a big vector object with all the key value pair, and the prefix can be retrieved by calling the get method on that object.</p>

<p>I need this function to be called once for the program life cycle. Please suggest me the best logic to implement this.</p>

<p>Regards.</p>
