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.