title: Generics, V extends T, no error even if incompatible types
body: <p>I am new to generics. What I understand from below syntax is V should be same or subclass of T, however this shows no compile error and returns False even when V is Integer while T String array.  </p>
  
  <pre><code>class GenMethDemo {
  
      public static &lt;T ,V extends T&gt; boolean isIn( T x, V[] y) {
  
          for ( int i =0; i&lt; y.length; i++ ) 
              if ( x.equals(y[i]) ) return true;
          return false;
  
      }
  }
  
  
  
  public class App {
  
      public static void main(String[] args) {
  
          String b[] = {"are", "how", "YOU"};
  
          System.out.println(GenMethDemo.isIn(1, b));
  
      }
  
  }
  </code></pre>
  
  <p>However if I replace <code>&lt;T,V extends T&gt;</code> with <code>&lt;T extends Comparable&lt;T&gt;, V extends T&gt;</code> the behaviour is as expected. </p>