Alternatively you can make calcualteAverage() a separate calculateAverage.java, and start it with the "package calculateAverage;" line.
Add the line "import calculateAverage.*;" to ArrayDemo.java
And why do this? Java is object oriented, and I fail to see how 'calculateAverage' represents an object, let alone a package...better advice would be to suggest a new class, perhaps call it MathUtils, which contains the calculateAverage method, and place this within a package more appropriately named (for example util)