style: enable ConstantName in checkstyle (#5139)

Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu>
This commit is contained in:
marysiuniq
2024-05-02 18:31:37 +02:00
committed by GitHub
parent ede3e4651f
commit 1e2d7e9431
16 changed files with 87 additions and 90 deletions

View File

@ -8,7 +8,7 @@ import java.util.Random;
*/
public class FindKthNumber {
private static final Random random = new Random();
private static final Random RANDOM = new Random();
public static void main(String[] args) {
/* generate an array with random size and random elements */
@ -29,11 +29,11 @@ public class FindKthNumber {
}
private static int[] generateArray(int capacity) {
int size = random.nextInt(capacity) + 1;
int size = RANDOM.nextInt(capacity) + 1;
int[] array = new int[size];
for (int i = 0; i < size; i++) {
array[i] = random.nextInt() % 100;
array[i] = RANDOM.nextInt() % 100;
}
return array;
}