I want to know the exact use of following two :

static synchronized(lock){ // (if lock is static and if lock is non-static)
// Accessing some objects (static only as here non-static data will not be allowed)
........
}

Synchronized(lock){// (if lock is static and if lock is non-static)
// Accessing some objects (both non-static & static)
........
}

I want to know some real world use of these two approches