Question 7
Consider the code given below.
class Dancer { public void perform() { System.out.println("Dancer performs"); } public void perform(String style) { System.out.println("Dancer performs " + style); }}class StreetDancer extends Dancer { public void perform(String move) { System.out.println("StreetDancer performs " + move); }}public class TestDance { public static void main(String[] args) { Dancer d = new StreetDancer(); // LINE 1 d.perform(); d.perform("hip-hop"); // LINE 2 }}Choose the correct option.