my main confusion is the face that f1 is a static variable and Object x is declared in a non-static method. I thouhgt only static methods could access static variables.
you've got it backwards: * only non-static methods can access non-static variables. * Static variables can be accessed by either static or non-static methods. * and lastly, static methods can NOT access non-static variables.