/**
*  This program is half of a program to demonstrate that the Java && operator
*  is a short circuit operator.  It illustrates that when the first condition
*  is true, the second condition WILL be examined
*  It will bomb with an unhandled exception
*
*  @author Elizabeth Adams
*  @version 1
*/

public class ShortCircuit1
{
  public static void main (String [] args)
  {
   int x [ ] =  { 1,2,3,4,5};
	int count = 1;
	int sum = 0;
	if (count < 10) 
	    System.out.println (" condition 1 true");
   System.out.println (" condition 2 erroneous ");

	while ((count < 10) && (sum < x[10]))
	{
	  	  sum = sum + x[i];
	     i++;
		  System.out.println (" Sum " +  sum);
	}
}
	




}