Java catch base exception class only

Java catch base exception class only
/**
 * @author lautturi.com
 * Java example:try catch exception
 */
import java.util.*;

public class Lautturi {

	public static void main(String[] args) {

		try {
			int array[] = new int[10];
			array[2] = 2 / 0;
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}
}
Source:‮ttual.www‬uri.com

output:

/ by zero
Created Time:2017-09-19 15:23:11  Author:lautturi