Can somebody help me with this code
public static String getFullName(Character letter) {
String fullname = null;
String[]fullnames = {"Glycine", "Alanine","Leucine", "Methionine", "Phenylalanine", "Tryptophan", "Lysine", "Serine", "Asparagine", "Aspartic acid"," Proline"," Valine", "Isoleucine", " Cystine","Tyrosine", "Histidine", "Arginine", "Threonine"," Glutamine","Glutamic acid", "stop"};
Character[]letters= {'G','A', 'L','M', 'F', 'W', 'K', 'S', 'N', 'D', 'P', 'V', 'I', 'C', 'Y', 'H','R', 'T','Q', 'E', '*'};
Map<Character,String> m = new HashMap<Character, String>();
for (int i=0; i<letters.length; i++){ m.put(letters[i], fullnames[i]); }
for (int i=0; i<letters.length; i++)
letter = m.get(letters[i]);
String fullname = m.get(fullnames[i]);
return fullname;
I got an error getFullName(java.lang.Character) in ProteinSequence cannot be applied to (java.lang.String)
System.out.println(seq.getFullName("G"));
^
I wonder why if I defined letters to be character array
This post has been edited by stanka: 09 April 2007 - 10:26 AM

New Topic/Question
Reply




MultiQuote





|