I am trying to print a list of entries from a JSONarray in a .json file, but somehow it seems that it is printing something else (I am guessing it is some kind of address based on the thing that is printed out). Could someone tell me what is wrong with my code? or that is what should be printed.
My .json file looke likes this:
So, I used the following code:
private void printThingies() {
List<Thingy> thingies = workRoom.getThingies();
for (Thingy t : thingies) {
System.out.println("Why is this getting printed: " + t);
System.out.println(t.getName());
System.out.println(t.getCate());
}
The thing I don't understand is why model.Thingy@b4c966a is getting printed? I was expecting the output to look like this as I was able to use the same code to output something like this in another project, so I am not sure why the "address like" thing is getting printed, could someone suggest a fix or possible source of error: