Filtering specific type from list
<p>How to get all dogs only?</p>

<p>In C#, you can use <code>animals.OfType&lt;Dog&gt;()</code>, is there any shortcut in Java?</p>

<pre><code>private static void snoopDogs() {

    Animal[] animals = { new Dog("Greyhound"), new Cat("Lion"), new Dog("Japanese Spitz") };

    for(Dog x : animals) { 
        System.out.println("Come over here");
    }

}
</code></pre>
