1

2
Consider the following source code:
public class Foo {
public static void main(String [] args)
{
int x;
Object ob = new String("ab");
String s = "ab";
long w = s.length();
x = ob.length();
x = ((String)ob).length()+2;
x = foo(ob, x, x);
x = foo(s, x, w);
x = foo(s, x, x);
System.out.println(x);
}
public static int foo(Object o, long i, int j){
return 5;
}
public static int foo(String s, int i, long j){
return 6;
}
}
