aspose file tools*
The moose likes Beginning Java and the fly likes Array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Array" Watch "Array" New topic
Author

Array

Anne Saizan
Ranch Hand

Joined: May 07, 2011
Posts: 35
hello,
How to add new element of the array.
if i have
String[] shoppingCart = new String[20];
how to add the new element of the shopping cart?
Thanks you
Rahul Sudip Bose
Ranch Hand

Joined: Jan 21, 2011
Posts: 637

shoppingCart[1] = "books";
shoppingCart[2] = "games";

etc...


SCJP 6. Learning more now.
Anne Saizan
Ranch Hand

Joined: May 07, 2011
Posts: 35
thanks for the reply.
but, what I mean is.




Dawid Skrzypczynski
Ranch Hand

Joined: Jun 08, 2011
Posts: 52
Something like this ?

 
 
subject: Array