Making Arrays

Code

    /// Name: Rachel Smith
    /// Period: 5
    /// Program Name: Making Arrays
    /// File Name: MakingArrays.java
    /// Date Finished: 3/9/2016
    
    public class MakingArrays {
    
        public static void main(String[] args) {
            
            int rachelRay[] = {1, 2, 3, 4};
            
            System.out.println( rachelRay[0] + " " + rachelRay[1] + " " + rachelRay[2] + " " + rachelRay[3] );
            
            String[] text = new String[3];
            text[0] = "Miss";
            text[1] = "Rachel";
            text[2] = "Smith";
            
            System.out.println( text[0] + " " + text[1] + " " + text[2] );
            
        }
    }

    

Picture of the output

Assignment 1