Total members 11895 |It is currently Thu Dec 26, 2024 11:05 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Code:
public class S{

   public static 
void main(String args[]){
      
int a[] = new int[2];
      try{
         
System.out.println("Access element three :" a[3]);
      }catch(
ArrayIndexOutOfBoundsException e){
         
System.out.println("Exception thrown  :" e);
      }
      
finally{
         
a[0] = 6;
         
System.out.println("First element value: " +a[0]);
         
System.out.println("The finally statement is executed");
      }
   }





Author:
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Exception handling
 Exception Handling in a project     -  
 how to design a exception handling for a project     -  
 exception handling try and catch in Python     -  
 Out of Bounds exception     -  
 Exception is not clear     -  
 Multiple Exception Catching     -  
 Define your own exception class     -  
 String Too Long Exception     -  
 Exception Handler in java     -  
 java.security Exception in Applet     -  



Topic Tags

Java Exceptions
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com