Tagged articles
2 articles
Page 1 of 1
Lisa Notes
Lisa Notes
Apr 26, 2026 · Fundamentals

Master Java Object Type Conversion: Upcasting and Downcasting Basics

This article explains Java object type conversion, covering upcasting (implicit parent‑to‑child casting) and downcasting (explicit child‑to‑parent casting), their safety rules, static method behavior, and how to use the instanceof operator to avoid runtime errors.

DowncastingInstanceofJava
0 likes · 5 min read
Master Java Object Type Conversion: Upcasting and Downcasting Basics
Java Captain
Java Captain
Apr 21, 2018 · Fundamentals

Java Type Checking, Polymorphism, Upcasting and Downcasting

This article explains Java's strong typing, type declarations, basic primitive conversions (narrowing and widening), and demonstrates upcasting, downcasting, and polymorphism through concrete class examples such as Human, Cup, and BrokenCup, highlighting how the runtime resolves method calls.

DowncastingInheritanceJava
0 likes · 7 min read
Java Type Checking, Polymorphism, Upcasting and Downcasting