Date: 11/13/05 (Java Web) Keywords: java Let's begin with a simple example for this installment. import java.util.Collection; public class TestType { public static <Collection> Collection myMethod(Collection a) { return a; } public static void main(String ... args) { System.out.println(myMethod("Hello World")); } } Note: 1. The import statement is obviously not required. It has been added for [...] Source: http://blog.taragana.com/index.php/archive/writing-obfuscated-code-using-java-generics-part-1/
|