codice:
/**
 *
 * @author Andrea
 */
public class Esercizio16 {
    
    public static int strangeIndex(char c) {
        String haystack = "BCDFGHJKLMNPQRSTVWX";
        return (haystack.indexOf(c));
    }
    
    public static void main (String[] args) {
        System.out.println("F: "+strangeIndex('F'));
        System.out.println("A: "+strangeIndex('A'));
    }
    
}
EDIT: ho scritto i caratteri tutti in ordine, purtroppo mi sono accorto solo dopo che certi caratteri sono mischiati