CodeGym /Java Course /Module 2. Java Core /Useful links from the Professor — 14

Useful links from the Professor — 14

Module 2. Java Core
Level 7 , Lesson 3
Available

"Hello, Amigo! Nice to see you again. Well, have you coped with the instanceof operator and type casting? As always, I'm delighted at your success."

"Yes, it wasn't so difficult. I can't wait to find out what's next!"

"What's next is even more interesting. I think it'll be interesting for you to study a couple of relevant lessons, especially since I once wrote them from memory…"

"When? Sorry, Professor. I didn't hear."

"Uh, right now. Sit down and get comfortable. Enjoy your reading!"

How the instanceof operator works

This isn't our first introduction to instanceof, but now you know much more about inheritance and other principles of OOP. It's time to understand how conversion operators work. Consider some practical examples and analyze potential errors.

Widening and narrowing of reference types

In a previous lesson, we explored converting primitive types. But now let's talk about the same operators applied not to primitive types, but to objects and reference variables.

Comments (2)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Alexandru Ovcinicov Level 15, London, United Kingdom
4 October 2019
helpful theory inhalation between plaing keyboard piano
7 August 2019
this theory is really a complement to the practical tasks