kyoto dreams
Thursday, January 05, 2006
  Two Consider the code below.

When run, what is the output and why?


public class A {
private int count = 1;


public static void main(String []args) {
B b = new A().new B();
}

class B {
private int count = 2;

B() {
System.out.println(count);
}
}
}
 
Comments: Post a Comment

<< Home

ARCHIVES
May 2005 / June 2005 / August 2005 / January 2006 / March 2006 /


Powered by Blogger