i have a program thats has a data file that contains different strings like ATGTCATGG ATGCGATGGGGGGTCGCCCC ATGTTT the out put would be for this the closest two are 3 apart in length their indices are 0,2.
And the code so far that i have writen reads the file and checks how long each of the strngs are and it gives me what order the string is in. i have all this saved into a HashMap becasue an array list can only hold one value and hash map can hold 2. but my problem is that i cant figure out how do get the difference between the strings. the program is sapoose to find the clostest 2 and see how much they are apart by. i dont konw what to do with the hash map, becasue i cant sort the values .....
thankx [ edited to disable smilies -ds ] [ November 28, 2004: Message edited by: Dirk Schreckmann ]
i have a program that is using string tokenizer to grab a char and a double value, but the file's data is stored like this c 500 c 21000 p 550 c 5950 c 3000 <------------------------- l 4000 p 4050 and so on........... where i have that arrow is where i need help how would i get string tokenizer to skip that line and IO.prinln("invalid entry") but then continue on grabing the next values such as l 4000 and p 4050... so far my code goes and prints out everthing up to c 3000 and then crashes...
i have a for loop and now i dont know how i would add the int values in an array?
i need it to add the vaules together and then see if its a % of 10 and if its not i have to make it which is basiclayy value of n % 10 and add the remainder, which will give me my last values. and then with these values i have to decode a string..
okk thankx for the loop!, but in an array how would i add the value? beacsue i need to get the total value of the number the user enteres and then i have to see if its % 10 and if it not i have to make it %10.... i konw n+n wont work beacsue its just gonna add n to the same number.