For example: HashMap
HashMap
Recommended learning: java video tutorial
The following program:
Map map=new HashMap<String, String();
State that K (key) and V (value) can only be of String type, Only if all Keys and Values in your map are of type String, the program you write will be compiled.
List list=new ArrayList<Object();
Declare that all E (elements) in the list are of type Object.
Recommended related articles and tutorials: java introductory tutorial
The above is the detailed content of What does