Strange output when converting double arrays to string arrays, any help?

There doesn't seem to be anything wrong with my code (as far as I know), but it doesn't give the output I want, can someone help?
No description
No description
No description
46 Replies
JavaBot
JavaBot15mo ago
This post has been reserved for your question.
Hey @B3251! Please use /close or the Close Post button above when your problem is solved. 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.
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
would i just call a tostring function in the driver?
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
i have this in a separate Driver class
No description
B3251
B3251OP15mo ago
because this is one part of several questions
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
idk how to use the Arrays wrapper class
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
intelliJ ide?
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
oh no i use BlueJ that's what my professor wants us to use Its probably not the best though
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
well yeah i dont know about the whole Array wrapping bit
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
I would put this in the actual function program class and not the Driver class? I do need to return something which is confusing me
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
Here's what I have everything above is the same except I imported Arrays
No description
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
oh, is that what I would be returning?
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
Not sure if this is what you wanted me to do
No description
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
Yeah i suppose actually but
B3251
B3251OP15mo ago
i did try to return letterGrades before and the result was this
No description
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
yeah i just dont know what to do like print out the array?
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
okay sorry im just confused at the moment, I just have no clue how to make it actually print out the Array in the letter form
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
like this?
No description
B3251
B3251OP15mo ago
since when i do this and try running it doesn't run
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
No errors when the program is compiled (no syntax errors) just have a runtime error or osmething
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
that isnt it ty for the suggestion
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
tjoener
tjoener15mo ago
Arrays are objects, that's why you can toString them, even if the default implementation sucks
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
tjoener
tjoener15mo ago
https://docs.oracle.com/javase/specs/jls/se7/html/jls-10.html First sentence It's just that the implementations they have for equals, hashCode and toString are garbage
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
B3251
B3251OP15mo ago
Still need help
Unknown User
Unknown User15mo ago
Message Not Public
Sign In & Join Server To View
tjoener
tjoener15mo ago
Be. More. Specific.
B3251
B3251OP15mo ago
I got it nvm
JavaBot
JavaBot15mo ago
Post Closed
This post has been closed by <@1057008593100083260>.

Did you find this page helpful?