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

@ -13,7 +13,8 @@ public final class NonRepeatingElement {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int i, res = 0;
int i;
int res = 0;
System.out.println("Enter the number of elements in the array");
int n = sc.nextInt();
if ((n & 1) == 1) {
@ -42,7 +43,8 @@ public final class NonRepeatingElement {
// Finding the rightmost set bit
res = res & (-res);
int num1 = 0, num2 = 0;
int num1 = 0;
int num2 = 0;
for (i = 0; i < n; i++) {
if ((res & arr[i]) > 0) { // Case 1 explained below