function that always throws an exception in java code example
Example: java throws exception on method
static void testMethod() throws Exception {
String test = null;
test.toString();
}
static void testMethod() throws Exception {
String test = null;
test.toString();
}