@Override String toHex(String filepath) { try { FileReader readFile = new FileReader(filepath); BufferedReader readBuffer = new BufferedReader(readFile); } catch (IOException error) { System.out.println("Input output error: " + error); } return null; } There is such a block of code, I understand at this stage it looks senseless, but the question arose precisely in it. I understand the question may seem extremely trivial, but how to use readFile or readBuffer outside the try...catch ?
UPD: without using throws
FileReader readFile = null; try { ... } catch { ... } readFile.doSomething();- ArchDemon