mardi 18 octobre 2022

Java: Extend a static class from non static class

I have a class that is non-static. Let's say class A.

public class A

Can I extend this class to create an inner class?

Let's say

public class B {
    public static class nestedB extends A
    {
     // stuff
    }
}

Is this a good idea, or is this a good design?

Thanks!

Aucun commentaire:

Enregistrer un commentaire