I am making a simple script for a school project I want it to print amino acid sequences if I type one letter.
package emmas;
import java.util.Scanner;
public class Emma {
public static void main(String args[]){
@SuppressWarnings("resource")
Scanner Input = new Scanner(System.in);
int end = 0;
String f = "A,T,C", e = "A,T,G";
while (end != -1){
if(Input.hasNext()){
String input = Input.next();
Input.nextLine();
if(input.equalsIgnoreCase("f")){
System.out.println(f);
} else if(input.equalsIgnoreCase("e")){
System.out.println(e);
}
}
}
}
}
This is my code, I want to make it so that if I type for example "ffe" it will return ATC,ATC,ATG I dont know how(this has to apply for up to 20 different letters. I only have 2 here as i haven't added them all).