Image

Can someone tell me why this is wrong?

class Base { }
class Sub extends Base { }
class Sub2 extends Base { }

public class CEx {
public static void main(String args[]){
Base b = new Base();
Sub s = (Sub) b;
}
}

The answer is 'Runtime Exception'...Why can't we cast a base into a sub? I thought if you move down the hierarchy a cast is required and all is well.