The constructor that takes no parameters (i.e., the default constructor) will construct an exception with null as the error message (see the documentation for Exception). The second constructor (that takes a string as a parameter) allows us to specify the error message associated with the exception (again, see the documentation for Exception).
It's often useful to associate error messages that provide specific information about the problem. Suppose we are designing an exception that will be thrown if a client provides an index that is out of bounds when using the following method of the ArrayList<E> class, for example:
public E get( int index );
We could tailor the error message so that the incorrect index appears as part of that message - this can be very helpful for debugging purposes.
Paul