Java异常处理之InvocationTargetException(反射异常)
<div id="cnblogs_post_body" class="blogpost-body"><p><strong><span style="font-size: 18pt;"> Java异常处理之InvocationTargetException(反射异常)<br></span></strong></p> <p> </p> <p>InvocationTargetException异常由Method.invoke(obj, args...)方法抛出。<strong><span style="font-size: 16px;"><span style="color: #ff0000;">当被调用的方法的内部抛出了异常而没有被捕获时,将由此异常接收!!!</span></span></strong></p> <p><strong>示例:</strong></p> <div class="dp-highlighter bg_java"><ol class="dp-j" start="1"> <li class="alt"><span class="keyword">package com.zzj.test.reflect; </span></li> <li> </li> <li class="alt"><span class="keyword">public <span