Online Course Discussion Forum

APCSA exam 2014 FRQ #1 unexpected error

 
 
WangJialin的头像
APCSA exam 2014 FRQ #1 unexpected error
WangJialin - 2022年07月25日 Monday 20:58
 

Here's my answer for APCSA exam 2014 FRQ #1. My result turned out to be some random thing for some reason. I'm not sure what's the cause of this. What does this output mean?


Screenshot:


 
WangJialin的头像
Re: APCSA exam 2014 FRQ #1 unexpected error
WangJialin - 2022年07月25日 Monday 22:55
 

Screenshot:



https://docs.google.com/document/d/1tKHZT13a8ZX0WcEQ1ethjrh3YFjNJfxUrZN_euHyc8c/edit?usp=sharing

WangDr. Kevin的头像
Re: APCSA exam 2014 FRQ #1 unexpected error
WangDr. Kevin - 2022年07月26日 Tuesday 01:23
 

It means an array of Strings cannot be printed like that.  What is being printed is the reference value of the array.  If you want to output the actual Strings, use a loop to print each element.