Page 34 - PowerPoint Presentation
P. 34

Java Arrays (Lanjutan)







          •      We have now declared a variable that holds an array of strings. To insert values to




                 it, we can use an array literal - place the values in a comma-separated list, inside

                 curly braces :





          •      To create an array of integers, you could write:


















                                                                                                                                      34
   29   30   31   32   33   34   35   36   37   38   39