hashMap.put("name", fruitsNames[i]); code example Example: hashMap.put("name", fruits Names[i]); hashMap.put("name", fruitsNames[i]);