Newer
Older
java_learning / java-learning / src / jp / co / jid / exceptionSample / ThrowNewException.java
himeno on 2 Aug 2019 294 bytes init
package jp.co.jid.exceptionSample;

public class ThrowNewException {

	public static void main(String[] args) {
		try {
			String str = null;
			if (str == null) {
				throw new NullPointerException();
			}
		} catch (NullPointerException e) {
			e.printStackTrace();
		}
	}

}