title: Use of "instanceof" in Java
body: <blockquote>
    <p><a href="https://stackoverflow.com/questions/7313559/what-is-the-instanceof-operator-used-for">What is the &#39;instanceof&#39; operator used for?</a>  </p>
  </blockquote>
  
  
  
  <p>I learned that Java has the <code>instanceof</code> operator. Can you elaborate where it is used and what are its advantages?</p>