Friday, July 30, 2010


Courtesy of SCJP Sun® Certified Programmer for Java™ 6 Study Guide Exam (310-065) (9780071591065)
Chapter 1, Question 9

When this code is compiled, it give the following error: non-static method countGold(int,int) cannot be referenced from a static context
1 error

However, Short myGold is autoboxed correctly to int.

No comments:

Post a Comment