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