It's hard to tell from your post what's going on. But ...
DNA_align.insert(0,"|");
If DNA_align
really is a String
, then there's no insert
method, as AnubianNoob pointed out. If you're trying to insert |
before the first character of the string, then you can just concatenate it, like this:
"|" + DNA_align;
Also, note that strings are immutable in Java; if s
is a String
, there is no method s.method(whatever)
that modifies the contents of s
. There are some methods that make changes to the string and return the changed string as a new string, but s
's contents will not be modified. So if you were hoping for a method that changed DNA_align
by inserting something into it, forget it. You have to reassign DNA_align
, like:
DNA_align = "|" + DNA_align;