a String is one Object (of the type String). an array is a small collection of Objects.
for instance: you know you need to keep seven String-Objects, containing the days of the week, in your program.
String dayOne = "Monday";
String dayTwo = "Tuesday";
...
like here above, this are seperate Objects of the type String.
if you would use:
String week[] = {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
then, you have one array, containing seven String Objects.
now you can use:
dayOne = week[0];
=> this will load the first element of the array into the variable with the name dayOne.
stultuske
Posting Sensei
3,119 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 432
Strings aren't arrays, arrays aren't strings.
What's the difference between a basketball and a barbequeue?
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337