#How would I cast char[] to Character[]?
17 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @silver dust! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
you wouldn't cast. they aren't compatible
is there another way I could pass my char[] in?
you could transform between them but i guess you'd probably need to loop to cast each individual Character to char since there's no specialization of CharStream
but this seems a bit like https://xyproblem.info to me, could you give some more context? why do you need to go from a generic to a specific primitive?
Asking about your attempted solution rather than your actual problem
im trying to pass a string in with toCharArray
so I need to cast a char[] to Character[]
not Character[] to char[]
ohhhh i misread that heavily
mb hold on
yeah that makes a lot more sense
you still have to loop to transform though
there is ArrayUtils but it's not standard
ok, thanks
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
This post has been closed by @silver dust.