One reason may be this : In real project , we never just write printStackTrace() method in a catch block , we do something specific depends on exception type .
Like if there is FileNotFoundException then we can provide any local file . So we catch exception separately & do something specific for them .
In which situation , it is recommended ?
Well , I don't think , it is recommended in any situation .