Перейти к содержимому

Java Tutorial for Beginners #19 | Polymorphism in Java, invented from scratch

SyntaxPilot

0:00 / 0:00

Java Tutorial for Beginners #19 | Polymorphism in Java, invented from scratch

0 просмотров · 17 ч назад
SyntaxPilot
37 подписчиков
0 просмотров · 17 ч назад
Java Tutorial for Beginners: Episode 19 of SyntaxPilot's free Java full course, with real-life examples for every concept. Polymorphism in Java, invented from scratch. In this video you'll learn: • Why type strings and if/else chains break • Runtime polymorphism: one loop, many behaviours • Upcasting: Person p = new Student(...) • Reference type vs object type • cannot find symbol: location: variable p of type Person • instanceof, downcasting and ClassCastException • Compile-time polymorphism: method overloading • Overloading vs overriding: who decides, and when Every concept starts with a real-life example, then an animation and notes, then live code in the SyntaxPilot online compiler. Practice free in the SyntaxPilot compiler (nothing to install): https://syntaxpilot-learning-2026.web... Detailed notes for this episode (code, outputs, practice): https://syntaxpilot-learning-2026.web... Chapters 00:00 Welcome 00:21 Today's agenda 00:42 The school bell 01:05 if/else chains break 02:13 One loop, many behaviours 02:57 The remote and the TV 04:22 instanceof and casting 05:17 Overloading 06:30 Compile time vs runtime 07:41 You invented polymorphism 08:27 Common mistakes 08:45 Quick quiz 09:09 Recap and homework 09:46 Next episode Next episode: Abstract classes Post your homework and quiz answer in the comments, and subscribe for the full basic-to-master playlist, free. #Java #JavaTutorial #SyntaxPilot