From the following code fragments select the most appropriate way of throwing exceptions ?Assume that variable i is properly defined , in scope and has appropriate value
if ( i > 10) { throws new IndexOutOfBoundsException("Index is out of bound!"); }
if ( i > 10) { throw new IndexOutOfBoundsException("The value of index i=" + " is out of bound!" ); }
if ( i > 10) { throw "Index is out of bound!"; }
None of the ABove