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: How to make spherical (360) panoramic image with 2:1 aspect ratio?
Answer: The tools you need are a camera with a lens, and panostitching software that can create a 360x180 panorama in equirectangular (2x1) format (Hugin is a good open source application).

Tools you'll probably also want are a tripod and panohead to rotate the lens around its no-parallax point to reduce possible stitching errors.  The smaller the space you're shooting in, the easier it is to get parallax that will interfere with a clean stitch, because objects will have moved relative to each other between member shots.

The number of photos you need to take depends upon the camera and lens you're using. Each image can only cover a specific amount of the scene, and to make an equirectangular, you need to cover the entire sphere, so even with an ultrawide zoom, you're liable to be shooting multiple rows of images, as well as a zenith (straight up) and nadir (straight down) shot.  Most people who shoot these kinds of panos prefer fisheye lenses, because of the larger coverage.  A lens with a 180-degree HFoV can cover the scene in four shots (theoretically two, but there would be no overlap for stitching).  A fisheye lens with a 135 degree HFoV (like the micro four-thirds Samyang 7.5 fisheye or Sigma/Nikon 10mm-ish fisheyes) would require six shots around and a zenith and nadir.  An ultrawide like a 10-20 rectilinear lens would typically require two to three rows of 5-8 images, and a zenith and nadir.

The best free package for stitching these types of panos is, as I mentioned above, Hugin. Commercially, there are quite a few other packages, but PTGui tends to get mentioned the most.  Using these packages, well, each has its own tutorials on the website, but the basic steps are typically loading the files, aligning them (where the package software determines control points on the member images that correspond to the same places in the scene), optimization/alignment using the control points, and then output of the final stitch.

This is a rather involved task and it has a steep learning curve. Don't expect to learn it all in a day.

See also: "How are virtual tour photos taken?"