I have some code with this structure:
public void method() { Object o; try { o = new Object(); } catch (Exception e) { //Processi
Instance variable is the Object type so you should initialize value "null"
public void method() { Object o=null; try { o = new Object(); } catch (Exception e) { handleError(); } doSomething(o); }