I can't find why it doesn't print "Color" | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
13th Apr 2019, 6:39 PM
Stelios Toump
Stelios Toump - avatar
2 Answers
+ 2
because you're trying to print object instead of printing it's variable. Try this (line 35): System.out.println(x.getColor());
13th Apr 2019, 7:10 PM
Someone Other
Someone Other - avatar
0
Thank you! It worked Someone Other
13th Apr 2019, 7:11 PM
Stelios Toump
Stelios Toump - avatar