This can do for two things, one if you want to use in code but not want to see in selection other name, and second one is if you want to display name in spinner and also use in code check below solution.
Create one common class to store country names and country codes like below
CommonClass.java
//I am taking it as CommonClass you can change it.
public static final String[] strCountryNames = {"India","Italy","Afghanistan","United States of America"};
public static final String[] strCountryCodes = {"IND","ITA","AFG","USA"};
Now, For spinner setAdapter use CommonClass.strCountryNames,
And where you want to use code there use CommonClass.strCountryCode,
Suppose you want to get code for India, then you can check it as
CommonClass.strCountryCode[spinner.selectyedPosition];