Let's say i created an object
class Data{
int key;
int frec;
int id;
public Data(int key, int frec, int id){
this.key = key;
this.frec = frec;
this.id = id;
}
}
and then i created a list
List<Data> list = new ArrayList<>();
list.add(new Data(2,3,0));
System.out.println(list);
How to print the whole thing without this [com.company.Main$1Data@3feba861]? or better yet, how to for instance, only print out the frec? or id? and so on. I couldnt find anything on google specifically about this, an object that contains 3 integers, and how to print / point one of the value of that object.