GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — JavaGeneric/JavaGenMUB11.java at main · AvinandanBose/JavaGeneric

Expand file tree

/

JavaGenMUB11.java

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
34 lines (27 loc) · 848 Bytes
/

JavaGenMUB11.java

Copy path

File metadata and controls

34 lines (27 loc) · 848 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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.