class name<T1, T2, ..., Tn> { /* ... */ } |
import java.util.ArrayList; public class ALtest { public static void main (String[] args) { ArrayList<String> al = new ArrayList<String>(); al.add(new String("xxx")); } } |
program-id. ALtest. configuration section. repository. class ArrayList as "java.util.ArrayList" class JString as "java.lang.String" . working-storage section. 77 al object reference ArrayList. procedure division. main. set al to ArrayList:>new(). al:>add(JString:>new("xxx")). goback. |
Note: ALTEST.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. |