This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
countGold(myGold, 6) basically resolves to this.countGold(myGold,6) and since the main method is static it means it is not running on any instance of class Frodo hence there exsists no object so cant invoke the instance method countGold(intx,inty) .
This is the basic reason why calling a non-static method directly from a static method, this is not allowed.