In the article that I am going to conduct for the second exam, they ask me: "Can blocks be polymorphic?"
If true, it makes no sense for me to call several blocks catchpolymorphic. Is this a polymorphism if the blocks catchcannot be named and contain only parameters in the method header?
For instance:
try {
} catch (FileNotFoundException e) {
System.err.println("FileNotFoundException: " + e.getMessage());
throw new SampleException(e);
} catch (IOException e) {
System.err.println("Caught IOException: " + e.getMessage());
}
Are these two blocks catchpolymorphic in this?
source
share