Class NegTest {
public static void main (String args[ ]) {
try {
int arr[ ] = new int [– 2] ;
System.out.Println (“first element :” + arr[0]);
} catch (NegativeArraySizeException n) {
System.Out.Println (“generated exception :” + n);
}
System.Out.Println (“after the try block”) ;
}
}
Home      |      About Us      |     Portfolio      |      Services      |      Courses      |     Career      |      Cost      |      Contact Us
Services
  SEO   
  Link Building
  Data Entry
  Web Design and development
  Web Application development
 

Graphic and multimedia

  E-Commerce Solutions
  Software development
  Web Marketing & Promoting
  Internet Marketing
  IT Outsourcing
  Multimedia/CD Presentation
  Synopsis Ideas
  Project Ideas
  Placement Papers
  Live Project Training
  Programming & Projects
  Faq
  Training @balujalabs
 
 
Method
 

To demonstrate the use of arithmetic exception.

 

 

 

 

 

 

 

 

 

                                                                                                                                          

1 To demonstrate the use of negative size Array exception
2 To demonstrate the use of arithmetic exception.
3 To demonstrate the use of multiple catch.
4 To demonstrate the use of Array index out Bounds Exception.
5 To demonstrate the use of string index out of bound exception.
6 To demonstrate the use of Null pointer Exception.