mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-25 05:22:39 +08:00
style: enable ConstantName
in checkstyle (#5139)
Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu>
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user