Code not compiling - casting
<p>Commented code below are the reasons I think the code is not compiling, is this correct ?</p>

<pre><code>class Building {

}


public class Barn extends Building{

    public static void main(String args[]){
        Building build1 = new Building();
        Barn barn1 = new Barn();
        Barn barn2 = (Barn)build1;

        /**
         * Object is not a Building
         * Building is an Object
         */
        Object obj1 = Object(build1);

        /**
         * String is not a Building
         */
        String str1 = String(build1);

        /**
         * Building is not a Barn
         * Barn is a Building
         */
        Building build2 = Building(barn1);
    }

}
</code></pre>

<p>Inserted comments are my own. Why the two downvotes, I just did'nt realise the casting syntax was incorrect.</p>
