javasystem.printing

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


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?)


Solution

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