Glossary: Java Beyond the Basics
instanceof
Tests an object's type, and in p instanceof Cash cash also gives you the object as that type.
Glossary: Java Beyond the Basics
Tests an object's type, and in p instanceof Cash cash also gives you the object as that type.