I have the following code:
public static void closestInSubnet(int[][] adjlist, short[][] addrs, int src, short[][] queries) {
// TODO
List<String> address = ToList(addrs);
List<String> quer = ToList(queries);
for (String i : address) {
System.out.println(i);
}
}
public static List<String> ToList(short[][] preList) {
List<String> list = new ArrayList<String>();
for (short[] i : preList) {
list.add(i.toString());
}
return list;
}
I want it to be printing out the lists converted to Strings however I am getting the following in console:
[S@7637f22
[S@4926097b
[S@762efe5d
[S@5d22bbb7
[S@41a4555e
[S@3830f1c0
[S@39ed3c8d
[S@71dac704
[S@123772c4
I'm sure there is a quick fix for this any help would be great. thanks