So my understanding was that you can\'t use static method to access non-static variables, but I came across following code.
class Laptop { String memory =
Static methods cannot modify their value. You can get their current value by accessing them with the reference of current class.