(java) abstract AND …. method #unfillable dental cavity

I think java “abstract” keyword evolved from c++ pure virtual…

abstract AND synchronized @@ no idea. I think [[ java precisely ]] covers this.

abstract AND private @@ No. http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#11244

abstract AND final @@ no. can’t be implemented

— abstract AND static @@ —
No. “It is a compile-time error for a static method to be declared abstract.” http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#11246 It all boils down to runtime^compile-time binding. First, you need to really understand that static calls are resolved at compile time — based on the declared type.

In general, given any static method s() in any baseclass B redefined in any subclass C, then C.s() can never step in to help B.s(). This holds whether B.s() is abstract or concrete.

Therefore, an abstract static method is an unfillable dental /cavity/, an /unrecoverable liability/. Such a construct makes no sense.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s