/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
	    Integer[] integers = new Integer[ 12 ] ;
	    System.out.println( Arrays.toString( integers ) ) ;
	    
	    integers[ 2 ] = 42 ;                      // Auto-boxing.
	    integers[ 5 ] = Integer.valueOf( 99 ) ;   // Unnecessary, because of auto-boxing.
	    System.out.println( Arrays.toString( integers ) ) ;
	    
	    boolean slotAtIndex5HoldsObjectRef = ( null != integers[ 5 ] ) ;
	    System.out.println( slotAtIndex5HoldsObjectRef ) ; 
	    
	    boolean slot5Filled = Objects.nonNull( integers[ 5 ] ) ;
	    System.out.println( slot5Filled ) ; 
	    
	    Integer x = Objects.requireNonNullElse( integers[ 5 ] , Integer.valueOf( 101 ) ) ;
	    Integer y = Objects.requireNonNullElse( integers[ 7 ] , Integer.valueOf( 101 ) ) ;
	    System.out.println( "x: " + x ) ; 
	    System.out.println( "y: " + y ) ; 
	}
}