//Array of Mobile Products
MobilePhones[] mobilePhoneProducts=null;
LinkedHashMap<String, String> mobilePhoneProductsMap = new LinkedHashMap<String, String>();
int mobilePhoneProductLength=mobilePhoneProducts.length;
//Adding the elements to a LinkedHashmap
for (int i =0 ; i < mobilePhoneProductLength ; i ++)
{
mobilePhoneProductsMap.put(mobilePhoneProducts[i].getProductName(),chkBookProducts[i].getProductName());
}
|