Casting will have no effect here, since the methods are non-static. Thanks to
polymorphism, the JVM will perform dynamic lookup or the
actual class of an object (at run time), regardless of what it's cast to.
In this case though, there is a crucial difference between the two functions you've defined - they have different argument lists. So to get at the second function, you need to use an integer argument, e.g. "p1.print(0);".