If I call a method in ClassB from main in ClassA, why is it that both classes must be in the same package, and ClassB must extend Class A? I found all of this out tonight (the hard way), when I finally got my main method to call a function in another class. The ONLY way it would compile and run was to declare both class files in the same package, and have the called class (containing the function I was calling)to extend the class containing main (the caller). Can anyone tell me why Java requires all of this?? No wonder this language is so difficult to grasp by just reading Java books?