I want to execute a print after else one time in java (without using break) :     A code to simulate the hashing
    

> A code to simulate the hashing
> I am new to Java so my question is very simple, how to stop many iterations and print Not found once without using break

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

> The main class 

 - main

    public class hash {  public static void main(String[] args)
        {
    	contact [] table = new contact [88];        //Create an object of contact class

    	   int tablesize = 88;
    	
    	 int Out= calc_hash( "NAME",tablesize);      
    	
    	    table [Out] = new contact() ;

    		table [Out].Name = "AHMED" ;
    		table [Out].phone =23445677;	
    	   System.out.println(Out); 
    	     
 

> My question is here

   	  
    	   for  (int i = 0; i < 36  ; i++) 
    	   {
    		if(table[i] !=null ) 
    		{
    			if (table [i].Name  != null) { 
            	System.out.println(i); 
            	System.out.println(table [i].Name);
            	System.out.println(table [i].phone);}
    		}
    		else  	
          		{ System.out.println("Not found"); } // Here "Not found" is printed with every iteration
    	   }
    	   
    	 

> Hash function

    	  
    	}
    	public static int calc_hash( String  key  , int table_size) {
    		
    	
    		int i, l = key.length();
    		int hash = 0;
    		for (i = 0; i < l ; i++) {
    			
    		hash += Character.getNumericValue(key.charAt(i));
    		hash += (hash << 10);
    		hash ^= (hash >> 6);
    		}
    		hash += (hash << 3);
    		hash ^= (hash >> 11);
    		hash += (hash << 15);
    		if ( hash > 0) return hash % table_size;
    		else return -hash % table_size;
    		}
    }


<!-- end snippet -->





