• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array

 
Anne Saizan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 637
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shoppingCart[1] = "books";
shoppingCart[2] = "games";

etc...
 
Anne Saizan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply.
but, what I mean is.




 
Dawid Skrzypczynski
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this ?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic