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:
Frodo.java:4: non-static method countGold(int,int) cannot be referenced from a static context
However, Short myGold is autoboxed correctly to int.