Start learning this material nowGet Started
Java Chapter 4a4 cards
Tagged as: economics, software, computer science, nursingCopy deck
No. Compiler error. A Dog could never be an instance of Cat. Different hierarchy.
Use the conditional operator to express this: If x is less than y, assign "yes" to answer. Otherwise assign "no" to answer.
String answer = (x < y) ? ''yes'':''no'';
Ready to start studying? Once you get going, we'll notify you when it is time to study next.