Your code does not compile for several reasons:
You use commas to concatenate. You should use +
.
You do not close the string that starts with "xonvenio
. In fact, I think you are talking about " covenant", not " xonvenio ".
You are using system
with lowercase letter instead of System
with uppercase.
Compare strings with ==
will not do what you want.
That \ n
should not have a space in between.
Your format string "priority =% .2f% n"
is malformed.
And actually, printf
does not concatenate anything, the reason is printf
is not a concatenation method, but a method to put data into a text template.
As for this statement that println
does not work with decimals, it is wrong. Your problem is actually that they do not come as formatted as you want, which is something completely different. The solution would be to format them properly before.
Unfortunately, you have not mastered Java basics. So, do not you dare call yourself an innovator in Java as long as you are not able to master the basics of language.