Runtime Exceptions

 public void testExceptions() {
		TestExceptions tst = new TestExceptions();
		tst.iThrowARuntimeException();
	}

 private static class TestExceptions {

		public void iThrowARuntimeException() throws SomeRuntimeExceptionICreated {
			throw new SomeRuntimeExceptionICreated();
		}

	}

	private static class SomeRuntimeExceptionICreated extends RuntimeException {

	}
  • Share/Bookmark