在文檔multiple try-catch
中有一個聲明。指定值以捕獲參數
If a catch block handles more than one exception type, then the catch parameter is implicitly final. In this example, the catch parameter ex is final and therefore you cannot assign any values to it within the catch block
但我不明白這一點。 cannot assign any values
是什麼意思?據我所知,我可以使用exception
對象的所有方法。他們在談論什麼assignment
?
LoL。它非常明顯。我失敗了,真的很難。 – lapots 2014-09-24 20:10:19