JavaSyntax
Extend a Class
Code example
class Puppy extends Dog { ... }Inherits from another class.
In Java, extend a class: inherits from another class — class Puppy extends Dog { ... }
class Puppy extends Dog { ... }class Puppy extends Dog { ... }Inherits from another class.
Use class Puppy extends Dog { ... }.
Use this pattern: class Puppy extends Dog { ... }
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.