We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection.toArray() returns Object[]. Attempting to cast the result to String[] results in a ClassCastException. The correct code would be:
Collection.toArray()
Object[]
String[]
ClassCastException
return (String[])this.items.toArray(new String[items.size()]);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Collection.toArray()
returnsObject[]
. Attempting to cast the result toString[]
results in aClassCastException
. The correct code would be:The text was updated successfully, but these errors were encountered: