Concept Flow - instanceof type guards
Start with variable
Check: variable instanceof Class?
No→Else branch
Yes
Inside if: variable treated as Class type
Use variable with Class properties/methods
End
The program checks if a variable is an instance of a class. If yes, it treats the variable as that class type inside the if block.