Java printf functionality for collections or arrays

In python you can make use of a tuple in a formatted print declaration and also the tuple values are made use of at the shown placements in the formatted string. For example:

>>> a = (1,"Hello",7.2)
>>> print "these are the values %d, %s, %f" % a
these are the values 1, Hello, 7.200000

Is there some means to make use of any kind of array or collection in a java printf declaration in a comparable means?

I've considered the and also it shows up to have actually constructed in assistance for some kinds like Calendar, yet I do not see anything for collections.

If this isn't given in java, exists any kind of java expression that would certainly be made use of in an instance similar to this where you are inhabiting collections and afterwards publishing the values from several collections making use of one layout string (apart from simply nested looping)?

2022-07-25 20:41:44
Source Share
Answers: 1

You might be interested by the class too.

2022-07-25 21:29:47