This is a quite silly question but i don't understand the combined use of catch and finally. As far as i know the code after a catch block will be executed whether or not an exception will be raised, so why using

```
try
{
    doSomething();
}
catch(Exception e)
{
    e.printStackTrace();
}
finally
{
    doSomethingInFinally();
}

```

instead of

```
try
{
    doSomething();
}
catch(Exception e)
{
    e.printStackTrace();
}

doSomethingInFinally();

```

? I always see people using the first pattern but i think it is extra code.