Hi Aishwarya > Say you name the following names: Tom, Aster, Ocarina, Tamil, Ernest. > Then the result would be: oscar
ie your first option. The instruction is a tad ambiguous. You don't remove character 2 from the string, and leave characters 1, 3, 4 etc, which is a technically valid interpretation of the instruction. Michèle's (quite clever) example is correct. Reusing his example, you don't want the remaining string to be: TmAterOarinaTmilEnest, which would be the result using the other interpretation. hth mcalex PS: Don't you just love a context-dependent language like English On Aug 15, 3:26 am, Michèle Garoche <[email protected]> wrote: > On Aug 14, 9:00 pm, Aishwarya Laxmi Dani<[email protected]> > wrote: > > Dear Sir, > > > I am a bit confused with homework's statement "It creates a new first > > name by taking the 2nd character of each String from the array"; does it > > mean that we have to remove first character from each name and new name will > > be from second character and onwards, or we need to take-off 2nd character > > from each name? > > Say you name the following names: Tom, Aster, Ocarina, Tamil, Ernest. > Then the result would be: oscar > Exactly what is explained in the homework. > > Michèle Garoche -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en
