I'm developing an app and I need to print this type of data
Map<String,Object> params = new LinkedHashMap<>();
How could I print it in the logcat console?
Import the Android log utility
import android.util.Log;
Then it's as simple as
Log.d("AnyTagYouWant", params.toString());
LinkedHashMap (like all AbstractMap subclasses) displays all its keys and values in its toString method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With