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/Example5.java at main · AvinandanBose/JavaGeneric

Expand file tree

/

Example5.java

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
21 lines (19 loc) · 740 Bytes
/

Example5.java

Copy path

File metadata and controls

21 lines (19 loc) · 740 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
import java.util.Map;
import java.util.NavigableMap;
import java.util.TreeMap;
public class Example5<T extends Map<? super String, ? super Number > & NavigableMap<? super String, ? super Number >> {
T get1(T t1, String s, Number n) {
t1.put(s, n);
return t1;
}
public static void main(String[] args) {
Example5<TreeMap<String, Number>> e1 = new Example5<>();
TreeMap<String, Number> al1 = new TreeMap<>();
e1.get1(al1, "One", 1);
e1.get1(al1, "Two", 2);
e1.get1(al1, "Three", 3);
e1.get1(al1, "Four", 4);
e1.get1(al1, "Five", 5).forEach((k,v) -> System.out.println(k + " " + v));
System.out.println("al = " + al1);
}
}
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.