posted 20 years ago
A static method can neither access non-static variables nor can call non-static methods. main() method is no exception.
Try this code
To access the myMethod() from main, you need to create an instance of MyClass and call it.
Same case with the non-static data also.
[ February 24, 2004: Message edited by: Mani Ram ]
Mani
Quaerendo Invenietis