Answer the question
In order to leave comments, you need to log in
How to format strings in Java like Python .format?
In general, it is necessary to generate a string (url).
{domen}/all/{city}/{category}/?view=list&page={page}
the string is set by the user (like {domen}, {city}, {page), etc.., but in a different place) and if necessary, the order is {domen}, {city}, {category}. For example, in python there is such a structure:
"{domen}/all/{city}/{category}/?view=list&page={page}"\
.format(category="категория", domen="домен", city="город", page="2")
java.text.MessageFormat.format("{0}/all/{1}/{2}/?view=list&page={3}"....
Answer the question
In order to leave comments, you need to log in
but requires a clear order of variablesWhy is that bad?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question