last time I asked how to populate a data structure here. Now I would like to know if there's something in Java, like the print_r I use in PHP, to represent what I have populated in the Maps and lists without having to do my own algorithm.
Any ideas?
print_r(variable, isStore) It is a built-in function in print_r in PHP that is used to print or display the contents of a variable. It essentially prints human-readable data about a variable. The value of the variable will be printed if it is a string, integer, or float.
The api. php file is in C:\Program Files\xampp\htdocs\project\app\api\api.
Python-printr is a module that allows to emulate the print_r() function of PHP by printing the objects properties of a class instance and its internal structure. If you need to use printr() function for list, tuples and dicts, please, don't use printr() function.
print_r() displays information about a variable in a way that's readable by humans. print_r(), var_dump() and var_export() will also show protected and private properties of objects.
Calling toString
on the collection should return a string containing all the elements string representations.
This won't work with built-in arrays though, as they don't have a toString
override and will just give you a memory address.
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