What is the reason that I get an error message "non-static method cannot be referenced from a static context" while trying to return a value from a class? what does it mean actually? Thanks, Erkki
Non-static methods -- i.e., regular instance methods -- have to have an object of the class to operate on. Static methods don't need an object. Therefore, you can't call a non-static method from a static one without creating an object. Here's an example of code that will cause this error message: