New course! Every coder should learn Generative AI!
Try a free lesson0
I can't find why it doesn't print "Color"
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());
0
Thank you! It worked Someone Other