I am on the Nob in Java, and I came across the code below and could not understand its function. maxw [] is an array of type int. row [] is an array of type String.
String format = " | %-"+maxW[i]+"s"; System.out.printf(format,row[i]);
My questions: For this statement: System.out.printf (format, row [i]); only '|' and after that, the value of the string [i] is printed, so why "% - (value maxW [i]) and" s "are not printed?
source share