GenuineSounds

Hehehe, neat little tool.

Jan 10th, 2014
246
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. public class Poop {
  2.  
  3.     public static void main(String[] args) {
  4.         System.out.println(findCommonAncestor(1, 2L, 3.0, ""));
  5.     }
  6.  
  7.     public static <A> String findCommonAncestor(A... in) {
  8.         // Get encapsulated Class name.
  9.         String name = in.getClass().getSimpleName();
  10.         // Clean up array.
  11.         return name.substring(0, name.length() - 2);
  12.     }
  13. }
  14.  
  15. // Output: Comparable
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment