Skip to content

Commit d0adbc3

Browse files
Update BitSwap.java
1 parent 0449c4b commit d0adbc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/thealgorithms/bitmanipulation/BitSwap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ private BitSwap() {
1717
* @return The modified value with swapped bits
1818
* @throws IllegalArgumentException if either position is negative or ≥ 32
1919
*/
20-
20+
2121
public static int bitSwap(int data, final int posA, final int posB) {
2222
if (posA < 0 || posA >= Integer.SIZE || posB < 0 || posB >= Integer.SIZE) {
2323
throw new IllegalArgumentException("Bit positions must be between 0 and 31");

0 commit comments

Comments
 (0)