ActionScript - Class Extends Object?
i've be开发者_StackOverflow中文版en poking around RIM's PlayBook SDK and noticed they extend Object on a lot of their classes.
are there benefits to extending Object on a custom class that would normally be unextended?
package qnx.notificationManager
{
public class Notification extends Object
{
...
If you do not specify that your class extends another class, the compiler automatically makes your class extend Object
. So the answer is that you don't gain any benefit; they must have just been trying to be explicit, or maybe the code was generated through decompilation.
精彩评论