Instanceof is a antipattern, if you need add new subtypes, requiere add other validation and you client is hight coupled with subtypes, if you change the subtypes class need change on client ( break Open Close)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Instanceof is a antipattern, if you need add new subtypes, requiere add other validation and you client is hight coupled with subtypes, if you change the subtypes class need change on client ( break Open Close)