Does salesforce Apex support static method inheritance?

public virtual class parent { public static void doStuff(){system.debug('stuff');} } public class child extends parent{} 

When i call

 child.doStuff(); 

I get this error: the method does not exist or the signature is incorrect: child.doStuff ()

Are static methods not inherited in salesforce, or am I doing something wrong?

+7
source share
1 answer

Apex is compatible with Java on this. Statics is not inherited.

+6
source

All Articles