You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Test.java 432B

12345678910111213141516171819202122232425262728
  1. package com.foo.bar;
  2. public class Test {
  3. abstract class X<T> {}
  4. class X1 extends X<Integer> {}
  5. class X2 extends X<String> {}
  6. public Test foo() {
  7. return this;
  8. }
  9. public <T> X<T> createMessage(int n) {
  10. X x;
  11. if (n == 0) {
  12. x = new X1();
  13. } else {
  14. x = new X2();
  15. }
  16. return x;
  17. }
  18. public static void main(String[] args) {
  19. }
  20. }