Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Inside main method an anonymous class is created which is a sublclass of Thread class. How can it access the go method without the class name ( B.go() )?
Although you have got your answer but still I would like to explain it here As you might know All Inner classes are compiled into top level classes. When an anonymous class accesses the members of its enclosing class at compile time the compiler will add the name of the enclosing class at the statement where you are accessing the enclosing class member(static). So your code after compilation will become-
[ August 05, 2008: Message edited by: AnkitJi Garg ]