What is the correct way of using return in the following method?
public Image getImage() {
try {
Image img = ImageIO.read(new File(URL));
return img;
} catch (IOException e) {
e.printStackTrace();
}
}
IDE asks me to return something at the end. But I don't know what I'm supposed to return.