Is there a way to print a Java model in InteliJ prompt?

30 Views Asked by At

When I sysout the RestModel in Java code, it's printed out like this.

[com.my.model.RestModel@14ab40d2]

Is there a way to display the Detail? (like Json?)

1

There are 1 best solutions below

0
Mureinik On BEST ANSWER

You can override your model's toString() method and have it print out the information you want in the format you want.