When I execute the below code:
map.forEach((key, value) -> System.out.println(key + ":" + value));
I get 15234:[com.org.myprj.Dashboard@18a6be14]
as sysout.
How to I get object value in hashmap? Here object is a row inserted in arraylist.
When I execute the below code:
map.forEach((key, value) -> System.out.println(key + ":" + value));
I get 15234:[com.org.myprj.Dashboard@18a6be14]
as sysout.
How to I get object value in hashmap? Here object is a row inserted in arraylist.
implement overridden toString method in object
example
class Dashboard{
private double re, im;
public Dashboard(double re, double im) {
this.re = re;
this.im = im;
}
@Override
public String toString() {
return String.format(re + " + i" + im);
}
}