style: enable MultipleVariableDeclarations in checkstyle (#5175)

Co-authored-by: vaibhav <vaibhav.waghmare@techprescient.com>
This commit is contained in:
vaibhav9t1
2024-05-25 23:48:27 +05:30
committed by GitHub
parent 44ce6e7b0d
commit 9eaa2bb756
82 changed files with 299 additions and 121 deletions

View File

@ -11,9 +11,10 @@ final class KeithNumber {
// user-defined function that checks if the given number is Keith or not
static boolean isKeith(int x) {
// List stores all the digits of the X
ArrayList<Integer> terms = new ArrayList<Integer>();
ArrayList<Integer> terms = new ArrayList<>();
// n denotes the number of digits
int temp = x, n = 0;
int temp = x;
int n = 0;
// executes until the condition becomes false
while (temp > 0) {
// determines the last digit of the number and add it to the List
@ -25,7 +26,8 @@ final class KeithNumber {
}
// reverse the List
Collections.reverse(terms);
int next_term = 0, i = n;
int next_term = 0;
int i = n;
// finds next term for the series
// loop executes until the condition returns true
while (next_term < x) {