i am having this problem , i have 8 strings say
( boy,topped,pens,remotes ,boted ,toyed, car,house)
but i am looking for 3 strings having substrings ending with a (ed,s,s )
for exapmle topped,pens,remotes
however i have to check by first checking the first string boy and i throw it away and go to the next and i find that it ens with the ed so i keep it in the array or any data structure i check the next work if it has s if the next word in the sequency has s then i continue with the third and the fourth topped,pens,remotes
and once i get that patter i can throw print the words out however the next words show that it has a ed so i insert in in the data structure and i check the next word which is not s so i have to drop boted and if toyed dint have s but it has ed is insert it as first and continue in that format ...its like a rolling bed
how can i develope this kind of program in java. any genius