Untitled

 avatar
unknown
java
3 years ago
1.0 kB
4
Indexable
/******************************************************************************

                            Online Java Compiler.
                Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.

*******************************************************************************/

public class Main
{
	public static void main(String[] args) {
		FindArray x = new FindArray();
		
		x.xd();
	}
	
	
	static class FindArray{
	    
	    void printBayag(){
	    System.out.println("south bayag");
	    }
	    
	    void xd(){
	        try{
    	    int[] arrayxd = {1,2,3,4,5};
    	    for(int i = 0; i<10; i++){
    	        System.out.println(arrayxd[i]);
    	    }
    	    
	        } catch (ArrayIndexOutOfBoundsException exp){
	            System.out.println("ArrayIndexOutOfBoundsException bayag error"); 
	        }
	        finally{
	            System.out.println("THIS WILL ALWAYS PRINT");
	        }
	    
	    
	    }
	}
	
	
}

Editor is loading...