View Single Post
  #2 (permalink)  
Old 05-02-2008, 09:28 PM
theonly theonly is offline
Member
 
Join Date: Apr 2008
Posts: 23
theonly is on a distinguished road
The following is not a full program, but sample codes.

Code:
// For loop & Array & If-else program //Creating array of length 21 String[] array = new String[20]; // Code for filling array with number 0 - 20 for( int i = 0; i < array.length -1; i++ ) { array[i] = i; } // If-else statement if (array != null) { System.out.println("Array is not empty"); } else { System.out.println("Array is empty"); }
Reply With Quote