Advertisement
Guest User

Untitled

a guest
May 25th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.17 KB | None | 0 0
  1. package programmazione_generica;
  2.  
  3. public class ArrayFind {
  4.     public static <T> T find(T[] t, T a){
  5.         for(T e : t)
  6.             if(e.equals(a))
  7.                 return e;
  8.         return null;
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement