HashMap — how to get the value?

There is code:
package com.company;

import java.util.ArrayList;
import java.util.HashMap;

public class Main {


 public static String URL = "url";
 public static String TITLE = "title";

 public static void main(String[] args ){

 ArrayList<hashmap<string ,string>> Sites = new ArrayList<>();
 HashMap<string,string> hashMap;

 hashMap = new HashMap<>();
hashMap.put(URL,"http://google.com");
hashMap.put(TITLE,"Google");
Sites.add(hashMap);

 hashMap = new HashMap<>();
hashMap.put(URL,"http://yandex.com");
hashMap.put(TITLE,"Yandex");
Sites.add(hashMap);

 hashMap = new HashMap<>();
hashMap.put(URL,"http://Yahoo.com");
hashMap.put(TITLE,"Yahoo");
Sites.add(hashMap);


 for(int i = 0; i <sites.size(); i++ ){ system.out.println(sites.get(i)); } }< code></sites.size();></string,string></hashmap<string>
<br / > This code returns:<br><blockquote>{title=Google, url=<a href>http://google.com}</a><br> {title=Facebook, url=<a href>http://yandex.com}</a><br> {title=Yahoo, url=<a href>http://Yahoo.com}</a></blockquote><br> But how to do so, to get :<br> Only the name of website and address.<br> PS: I Looked through the examples on <a href="https://stackoverflow.com/," rel="nofollow">https://stackoverflow.com/,</a> but there are a bit confusing.
June 8th 19 at 16:58
1 answer
June 8th 19 at 17:00
Solution
System.out.println(Sites.get(i).get(URL));
System.out.println(Sites.get(i).get(TITLE));
Thank you very much! - marc.Kirlin commented on June 8th 19 at 17:03

Find more questions by tags AndroidJava