Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Jesse Black   on Jul 13 In Java Category.

  
Question Answered By: Neil Turner   on Jul 13

To store  anything in a array  you first need to create the right kind of
array.

Anything[] blah = new Anything[5];

That just made a new Array which can hold 5 Anything objects (Anything
objects is just something I made up, don't expect Anything to realy mean
anything)

To add something into a array you simply

blah[0] = SomeThing;

This just added SomeThing to the array.

That probably isn't as totaly usefull as it seems, infact you probably
need to know how to put many strings into a array. I won't show you the
answer to that but I will lead you to using a for loop to step though
the array.

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on How can I store a string in an array? Or get search suggestion and latest updates.


Tagged: