Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading text into an array

Status
Not open for further replies.

akiba201

Programmer
Nov 7, 2005
30
CA
hi,
i wanna read words in the text bellow into an array. how do i do that??

all words are 4 letters long and separated by a space.

i'll very much appreaciate your help

HALL HALO HALT HAND HANG HANK HANS HARD HARK HARM HART HASH HAST HATE HATH HAUL HAVE HAWK HAYS HEAD HEAL HEAR HEAT HEBE HECK HEEL HEFT HELD HELL HELM HERB
 
Hi

Just fragment, the keyword is [tt]split()[/tt] :
Code:
String list="HALL HALO HALT HAND HANG HANK HANS HARD HARK HARM HART HASH HAST HATE HATH HAUL HAVE HAWK HAYS HEAD HEAL HEAR HEAT HEBE HECK HEEL HEFT HELD HELL HELM HERB";

[highlight #eee]String[] array=list.split(" ");[/highlight]

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top