GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — JavaGeneric/JavaGenMUB11.java at main · AvinandanBose/JavaGeneric Expand file tree/ Copy pathJavaGenMUB11.javaMore file actions 34 lines (27 loc) · 848 Bytes / Copy pathJavaGenMUB11.javaFile metadata and controls34 lines (27 loc) · 848 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 import java.util.ArrayList; import java.util.List; public class JavaGenMUB11 <T extends ArrayList<String> &List<String> >{ T list; public JavaGenMUB11(T list) { this.list = list; } public void add(String t) { list.add(t); } public String get(int index) { return list.get(index); } public static void main(String[] args) { ArrayList<String> list = new ArrayList<>(); list.add("one"); list.add("two"); list.add("three"); list.add("four"); list.add("five"); JavaGenMUB11<ArrayList<String>> obj = new JavaGenMUB11<>(list); System.out.println(obj.list); obj.add("six"); System.out.println(obj.list); System.out.println(obj.get(5)); } } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |