Online Course Discussion Forum
APCSA question
此讨论区有规定周期内发帖数量的限制,它被设置为 一周 内最多发帖 1 条。
Does it compile at all? The "food" variable is of "Food" class. Even though the object it references is a "Pizza" type, the compiler would not know that, so it should not know the "s2" field is available. I would expect the compiler to give an error right there. I am surprised that the code could pass compile and start to run.
社交网络