In real implementations- Its always better to use instance of before casting, so that you can avoid the class cast exception.
In your first go2() call at line 8- You are creating an Instance of Tree. And then in the go2() method you are trying to cast it to Redwood which Is not possible.
You can try passing in an Instance of Redwood as the first argument to go2() in which case it doesnt throw the exception. At run time JVM checks what object actually it is- a Tree or a Redwood and checks if it can do the cast. If its a Tree object it throws an Exception as already mentioned by Stephan.