What does <String, String> mean?

So, I'm sure this is a question about the Nob, but while reading a post in Android programming, I came across a line like this:

List<Map<String, String>> groupData = new ArrayList<Map<String, String>>();

My question is, what does it mean <Map<String, String>>? I tried Googling, but all I get is lists of Java statements.

+3
source share
4 answers

This is due to the fact that Listand Mapuse generics. So yours Listis a list Mapthat are Mapwith type keys Stringand type valuesString

You can read about generics here.

+5
source

a Map<type, type> - , . , Map<String, String> . generics. List<Map<String, String>> , , Map, String s

+2

Java Generics. , , . ; generics, .

. -

Map<String, String>

" Map, String String s." , .

List<Map<String, String>>

List , Map String String. , , .

, ; Java . , Java, .

+1

A , .

0

Source: https://habr.com/ru/post/1789165/


All Articles