title: Print isvowel string if its first and last character is a vowel?
body: <pre class="lang-java prettyprint-override"><code>import java.util.*;
  
  public class Main {
      public static boolean isVowel(String c) {
          return (c == &quot;a&quot; || c == &quot;A&quot;
                  || c == &quot;e&quot; || c == &quot;E&quot;
                  || c == &quot;i&quot; || c == &quot;I&quot;
                  || c == &quot;o&quot; || c == &quot;O&quot;
                  || c == &quot;u&quot; || c == &quot;U&quot;);
      }
  
      public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
          String input1[] = new String[4];
  
          for (int i = 0; i &lt; input1.length; i++) {
              input1[i] = sc.nextLine();
          }
  
          int i = 0;
          int j = input1.length;
  
          while (i &lt; 1) {
              if (isVowel(input1[i]) &amp;&amp; isVowel(input1[j - 1])) {
                  System.out.print(&quot;isVowel string&quot;);
              }
              i++;
          }
      }
  }
  </code></pre>
  <p>For example, input String array is <strong>oreo</strong>. so as its first character o (which is vowel) and its last character o (which is also vowel, it could be another vowel character also like e), so at last it should print isvowel string.<br>
  But the problem in my program is if condition I am not able to enter in it. I am not able to understand why?</p>