To store a string in an array of a custom object type in Java, the object type must be compatible with the string, as demonstrated with Object arrays. The user attempted to assign a string directly to an array of a custom type but encountered issues. A successful example was provided using an Object array, where a string was stored without problems. However, casting a string to a Float type failed, highlighting type compatibility issues in Java. The discussion clarifies that the language in question is Java, emphasizing the importance of type matching when storing values in arrays.