Online Course Discussion Forum

APCSA exam 2014 FRQ #1 unexpected error

 
 
Picture of Jialin Wang
APCSA exam 2014 FRQ #1 unexpected error
by Jialin Wang - Monday, July 25, 2022, 8:58 PM
 

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:


 
Picture of Jialin Wang
Re: APCSA exam 2014 FRQ #1 unexpected error
by Jialin Wang - Monday, July 25, 2022, 10:55 PM
 

Screenshot:



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

Picture of Dr. Kevin Wang
Re: APCSA exam 2014 FRQ #1 unexpected error
by Dr. Kevin Wang - Tuesday, July 26, 2022, 1:23 AM
 

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.