Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

AP CSA Question of the Day March 11, 2025

Reference
  1. Incorrect Correct No Answer was selected Invalid Answer

    Given:

    Armor.java

    public class Armor extends Item {/* Implementation not shown */}
    Java

    Key.java

    public class Key extends Item {/* Implementation not shown */}
    Java

    Potion.java

    public class Potion extends Item {/* Implementation not shown */}
    Java

    Item.java

    public class Item {
    
        public Item() {}
    
    }
    Java

    Main.java

    public class Main
    {
        public static void main(String[] args)
        {
            Armor armor = new Item();
            Key key = new Item();
            Potion potion = new Item();
        }
    }
    Java

    What will this program do?