|
|
|
|
|
by pjmlp
23 days ago
|
|
Yes, but contrary to Go, if you change an interface it will be a compiler error if additional methods are missing, unless they have default implementations. In Java type assertions are mostly used when writing code pre-generics style, like downcasting from a common subclasse into the actual implementation, not to see if an interface is supported, as it is a given from the type system. |
|