public class test2
{

public void sampleMethod()
{ // Inheritance and casting

Object o = new String("Susan");
System.out.println(o); // OK - Objects have a toString()
System.out.println(((String)o).length()); // OK - cast Object as String
System.out.println(o.length()); // No Good Object's don't have length
}
}