I am just, and I mean "just"..lol learning Arrays and Strings.. I am having trouble grasping many concepts such as the use of String Arrays in the following code in my book..
I tried to understand how all of this works and figured out some, but not much.. I don't get indexOf(), or substring(), or the length() ..and when you do the Array brackets  that just throws my Exception..lol No but it really distracts me and overwhelms me.. I feel I am expected to know all of this well, but can't seem to grasp it well yet .. I still have trouble understanding what an Object is ..
Sorry for the lengthy post, but if someone could please help me understand these things better I would be forever greatful..
hi, String class have lots of methods which can be used for different types of operations such as length():for finding out the length of the string,indexat():it will give the chracter at a particular index..........
so getting a better idea of different methods,you can refer the java API classes.
Regarding Object:Its the blue print of class.So once you will creat a object of a class,it can inherite all the properties of the class.
Originally posted by Satou kurinosuke: When there's a method that you don't understand, you should check the API first. It really helps : http://java.sun.com/j2se/1.4.2/docs/api/ Look for the Array class and check its methods.
Although that's a valid link to the API documentation -- although it's to an old version, not likely to be the one the OP is using -- the suggestion that he check the Array class is... well, rather misguided. You surely meant to recommend the java.lang.String class documentation here.
The Array class is for advanced uses only, as it has to do with the innards of the JVM itself. It has nothing to do with the program above.
We're crossing up two things here. Using arrays is fine and not too hard once you get a good mental picture of what they do. The Array class is a different story. Don't worry about it at all for a long while.
As far as that mental picture ... imagine a row of boxes on the floor. You can put something in the first box, the last box or any in between. Call the first one box and the last one box[boxCount-1] and you're doing arrays.
With an array of primitives every box will have something in it, initially the default value for the primitive (eg 0 for int) and later maybe something else you put in it.
With an array of objects the boxes start out empty (or null) until you put something in them.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi