Skip to content

Instantly share code, notes, and snippets.

import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
public class NewInstanceInConstructor {
public NewInstanceInConstructor() throws Throwable {
// チェック例外を送出する。
throw new IOException();
}
import java.io.IOException;
public class NewInstanceInClass {
public NewInstanceInClass() throws Throwable {
// チェック例外を送出する。
throw new IOException();
}
public static void main(String[] args) {