You are creating the data in your (static)
main
method. You then create a new
yiutube
instance and call its
add
method, but without any parametersd. You should change it so main captures the information and passes the data to add thus:
yiutube t = new yiutube();
for (Element row : document.getElementsByClass("author Link--primary css-truncate-target width-fit").subList(1, 23)) {
if (row.select("[href]").text().equals("")) {
continue;
} else {
String githubid = row.select("[href]").text();
System.out.println(githubid);
t.add(githubid, url);
}
}
Change the add method to:
public void add(String githubid, String url) {