Repetition of four successive bases
It is not possible to determine if multiple bases are duplicated.
public class testconsecutivebases{ public static void main (String[] args) { java.util.scanner input = new java.util.scanner ( system.in); system.out.print ("enter the number of values: "); string dnaseq = input.nextline (); if (Isconsecutivefour (DNASEQ)) System.out.println ("the series has consecutive four bases"); Else system.out.println ("The series has no consecutive four bases "); } public static boolean isconsecutivefour (String T) { char[] dt = t.tochararray (); for ( int i = 0; i < dt.length - 3; i++) { boolean isEqual = true; for (int j = i; j < i + 3; j++) { if (dt[j] != (dt[j + 1)) { isEqual = false; break; } } if (isequal) return true; } return false; }}
Java biometric-determine if the base has a continuous sequence of repeats