any hint pls
package com.codegym.task.task39.task3903;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Unequal exchange
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Please enter a number: ");
long number = Long.parseLong(reader.readLine());
System.out.println("Please enter the first index: ");
int i = Integer.parseInt(reader.readLine());
System.out.println("Please enter the second index: ");
int j = Integer.parseInt(reader.readLine());
System.out.println("The result of swapping bits is " + swapBits(number, i, j));
}
public static long swapBits(long number, int i, int j) {
String s = Long.toBinaryString(number);
String str = "";
int size = 32-s.length();
for (int k = 0; k < size; k++) {
str = str+0;
}
s= str+s;
System.out.println(s);
System.out.println(s.length());
char c = s.charAt(i);
char c2 = s.charAt(j);
char[] charr = s.toCharArray();
charr[i] = c2;
charr[j] = c;
System.out.println(String.valueOf(charr));
return number = (Long.parseLong(String.copyValueOf(charr)));
}
}