Multiple choice technology web technology

Define and extend an ActionScript class. You have a custom component named MyButton that inherits from Button. Which syntax is used to create a class that extends from Button?

  1. public class MyButton extends Button

  2. public class MyButton becomes Button

  3. public class MyButton inherits Button

  4. public class MyButton implements Button

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

ActionScript uses the 'extends' keyword for class inheritance, following Java's syntax. The correct declaration is 'public class MyButton extends Button'. Option B uses 'becomes' which is not valid. Option C uses 'inherits' which is not ActionScript syntax. Option D uses 'implements' which is for interfaces, not class inheritance.