Wednesday, July 27, 2011

Page 366 Problem 6.

line 21: x=3; Is incorrect because a non static variable cannot be referenced in a static method.
line 26: doIt(); Is incorrect because a non static method cannot be referenced inside of a static method.
Line 30: test.doIt(); Is incorrect because of the same reason as line 26.

No comments:

Post a Comment