Jump to content

User:XNosis

From Wikipedia, the free encyclopedia

public class Arrays{

      public static void main <String [  ]  args>    {

              String[  ] groceries -  {

                     "oranges" , "apples" , "milk" , "bread" , "butter" , "pepper" , "salt" , "sugar" , " pears"

              } ;

              double[  ] gpas. -  {

              } ;

             System.out.println<groceries[0]>; //returns  "oranges"            

             System.out.println<groceries[1]>; //returns. "apples"

             System.out.println<gpas [3]>; //returns "3.55"

      }

}