I have made a program to count the number of vowels and consonants in an inputted string:

        Scanner in = new Scanner(System.in);


System.out.print("Enter a string ");
    String phrase = in.nextLine();

int i, length, vowels = 0;
int consonants = 0;
boolean y = false;
String j;
length = phrase.length();
for (i = 0; i &lt; length; i++)
{



        j = "" + phrase.charAt(i);


     boolean isAVowel = "aeiou".contains(j.toLowerCase());
     boolean y = "y".contains(j.toLowerCase());


     if(isAVowel){
         vowels++;
     }else if(isAVowel &amp;&amp; y){
     vowels++;
    consonants++;
//}else if(y &amp;&amp; !(isAVowel)){
//   vowels++;
      }else{
      consonants++;
      }


System.out.println("The number of vowels in \"" +phrase+"\" is "+ vowels+".\n\nThe number of consonants is "+consonants+".\n\n");


When "y" is by itself it says its a consonant, it should be a vowel. Where do I state this?


Question: iMessage Weird Behavior
Answer: iMessages on an iPhone will always receive on the phone number of that phone, and (by default) the email address associated with the iTunes ID you logged into.

On an iPad or iPod, there is obviously no phone number and so they will only listen on the email address of the Apple ID.

However you are able to add additional email addresses to receive messages against.  You are welcome to create any number of additional iCloud accounts for each device and add them into Settings &gt; Messages &gt; Receive At.

Then you just need to remember to use the correct email address to start a new conversation with.  You can have contact entries for "My iPad/myipad@me.com" and "The Wife's iPod/thewifesipod@me.com" etc if you wish to effectively address a device directly rather than the user of the device.