It sounds as though you are calling a method from
your main() that is not declared as static.1)
Try adding the "static" keyword to the method,
or2) Move the method call to the
constructor:public class MyClass { public int x; MyClass()
{ this.x = methodCall();
System.out.println("int value = " + this.x); } public int
methodCall() { //not static! return 2; //return an int
} public static void main(String [] s) {
MyClass mc = new MyClass();
}}HTHepenakPS you wrote "hope all of you get up on the
right
side of the bed this time."1) Sometimes we
beat up on people in a random way just to keep
everybody on their toes!2) The folks here are surly,
unruly and unpredictable!3) We always get up on the
wrong side of bed!:-)