mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-25 05:22:39 +08:00
style: include VA_FORMAT_STRING_USES_NEWLINE
(#5151)
This commit is contained in:
@ -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;
|
||||
|
@ -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: {
|
||||
|
@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user