added some info about System.out.printf() method (#22070)

printf() method uses a stringbuilder wich is more efficient in memory
This commit is contained in:
Brent Willems
2018-11-18 16:44:42 +01:00
committed by nik
parent a69419c8a1
commit cddd01ecef

View File

@ -69,6 +69,10 @@ public class StringExample{
}
}
```
If you want to print a string with values in Java it is better to use the following:
System.out.printf("example text with %s",value); //where value is a parameter
This uses the StringBuilder Class wich is more efficient for memory.
Output:
```