From the course: Java SE 11 Developer (1Z0-819) Cert Prep
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Subclass declaration - Java Tutorial
From the course: Java SE 11 Developer (1Z0-819) Cert Prep
Subclass declaration
- Now it's time to investigate Subclass Declarations. Subclass declaration has a syntax which starts with a regular class declaration intro, followed by the keyword extends and a name of the parent class. Then optionally will have implements clause to follow. The extends keyword is followed by the parent class name and only one immediate parent class is ever permitted. Multiple parents do exist, but they are a chain of ancestors, parent, grandparent, and so forth. If the extends clause is emitted, the parent is implicitly Java.Lang.Object. If an implements clause is used, the extends clause must come first, if it's there too. Subclassing can be controlled. A class that is marked final cannot be sub classed. A class that has only private constructors can be sub classed only by nested or inner classes. The point here is that a subclass must be able to initialize its parent elements and must therefore have access to the parent class constructor. Methods in a subclass that have the same…
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
(Locked)
Module 3: Java object-oriented approach1m 21s
-
(Locked)
Learning objectives40s
-
(Locked)
Source files and basic type declarations6m 32s
-
(Locked)
Nested type declarations8m 31s
-
(Locked)
Inner class declarations, part 17m 6s
-
(Locked)
Inner class declaration, part 215m 22s
-
(Locked)
Local and anonymous class declarations9m 45s
-
(Locked)
Reachability analysis12m 59s
-
(Locked)
Question deep dive4m 14s
-
(Locked)
-
-
(Locked)
Learning objectives47s
-
(Locked)
Instance and static fields, part 18m 52s
-
(Locked)
Instance and static fields, part 212m 9s
-
(Locked)
Instance and static methods, part 18m 57s
-
(Locked)
Instance and static methods, part 211m 9s
-
(Locked)
Variable length argument handling3m 10s
-
(Locked)
Overloaded and overridden methods, part 19m 24s
-
(Locked)
Overloaded and overridden methods, part 212m 29s
-
(Locked)
Question deep dive3m 34s
-
(Locked)
-
-
(Locked)
Module 5: Working with streams and lambda expressions39s
-
(Locked)
Learning objectives45s
-
(Locked)
Lambda expression syntax variations12m 8s
-
(Locked)
Lambda expression contexts6m 5s
-
(Locked)
Core functional interfaces10m 35s
-
(Locked)
Method references12m 16s
-
(Locked)
Question deep dive4m 45s
-
(Locked)
-
-
(Locked)
Learning objectives58s
-
(Locked)
Collection and reduction, part 113m 8s
-
(Locked)
Collection and reduction, part 26m 42s
-
(Locked)
Grouping and partitioning with collectors6m 33s
-
(Locked)
Downstream operations with collectors9m 10s
-
(Locked)
Parallel stream operation7m 21s
-
(Locked)
Question deep dive3m 53s
-
(Locked)
-
-
(Locked)
Learning objectives54s
-
(Locked)
Race conditions, deadlock, and livelock12m 20s
-
(Locked)
Transactional integrity12m 32s
-
(Locked)
Visibility16m 49s
-
(Locked)
Concurrent queues and collections10m 23s
-
(Locked)
Synchronizers, locks, and atomic types, part 114m
-
(Locked)
Synchronizers, locks, and atomic types, part 215m 57s
-
(Locked)
Question deep dive1m 26s
-
(Locked)
-
-
(Locked)
Module 9: Annotations, localization, and secure coding in Java SE application1m 4s
-
(Locked)
Learning objectives36s
-
(Locked)
Annotation declaration and elements7m 6s
-
(Locked)
Target, retention, and inspection8m 49s
-
(Locked)
Element types and repeatable annotations3m 6s
-
(Locked)
Question deep dive2m 50s
-
(Locked)