mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-28 06:55:02 +08:00
Format code with prettier (#3375)
This commit is contained in:
@ -52,9 +52,10 @@ public class SieveOfEratosthenes {
|
||||
}
|
||||
|
||||
//Write all primes to result array
|
||||
int primesCount = (int) Arrays.stream(numbers)
|
||||
.filter(element -> element == Type.PRIME)
|
||||
.count();
|
||||
int primesCount = (int) Arrays
|
||||
.stream(numbers)
|
||||
.filter(element -> element == Type.PRIME)
|
||||
.count();
|
||||
int[] primes = new int[primesCount];
|
||||
|
||||
int primeIndex = 0;
|
||||
@ -68,7 +69,8 @@ public class SieveOfEratosthenes {
|
||||
}
|
||||
|
||||
private enum Type {
|
||||
PRIME, NOT_PRIME
|
||||
PRIME,
|
||||
NOT_PRIME,
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
Reference in New Issue
Block a user