style: include VA_FORMAT_STRING_USES_NEWLINE (#5151)

This commit is contained in:
Piotr Idzik
2024-05-09 17:21:04 +02:00
committed by GitHub
parent 7bff82f175
commit 27c0978851
7 changed files with 8 additions and 11 deletions

View File

@ -213,7 +213,7 @@ public class HashMapCuckooHashing {
public double checkLoadFactor() {
double factor = (double) size / tableSize;
if (factor > .7) {
System.out.printf("Load factor is %.2f , rehashing table\n", factor);
System.out.printf("Load factor is %.2f , rehashing table%n", factor);
reHashTableIncreasesTableSize();
}
return factor;

View File

@ -54,7 +54,7 @@ public final class MainCuckooHashing {
break;
}
case 6: {
System.out.printf("Load factor is: %.2f\n", h.checkLoadFactor());
System.out.printf("Load factor is: %.2f%n", h.checkLoadFactor());
break;
}
case 7: {

View File

@ -81,7 +81,7 @@ public final class CreateAndDetectLoop {
System.out.println("Enter the number of elements to be inserted: ");
int n = sc.nextInt();
System.out.printf("Enter the %d elements: \n", n);
System.out.printf("Enter the %d elements: %n", n);
while (n-- > 0) {
singlyLinkedList.insert(sc.nextInt());
}