fork download
  1. import java.lang.annotation.*;
  2.  
  3. class B38203081 {
  4. void g(int @A [] @B ... xs) {
  5. System.out.println("Called g with " + xs.length + " arrays");
  6. }
  7.  
  8. public static void main(String[] args) throws Exception {
  9. var obj = new B38203081();
  10. obj.g(new int[]{1, 2}, new int[]{3, 4});
  11. }
  12. }
  13.  
  14. @Target(ElementType.TYPE_USE)
  15. @Retention(RetentionPolicy.RUNTIME)
  16. @interface A {}
  17.  
  18. @Target(ElementType.TYPE_USE)
  19. @Retention(RetentionPolicy.RUNTIME)
  20. @interface B {}
  21.  
  22.  
Success #stdin #stdout 0.11s 55396KB
stdin
Standard input is empty
stdout
Called g with 2 arrays