Skip to content

Commit f2453fc

Browse files
fix: Hide the constructor for SwapNumbersUsingXor to make it an utility class
1 parent 4d50fd6 commit f2453fc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@
2626
* After these three steps, the values of a and b are swapped.
2727
*
2828
* For more information, refer to the
29-
* <a href="https://en.wikipedia.org/wiki/XOR_swap_algorithm"> XOR swap algorithm </a>.
29+
* <a href="https://en.wikipedia.org/wiki/XOR_swap_algorithm">XOR swap algorithm</a>.
3030
*
31-
* Example usage:
31+
* <b>Example usage:</b>
3232
* <code>
3333
* int[] result = SwapNumbersUsingXor.swap(5, 3);<br>
3434
* System.out.println("After swap: a = " + result[0] + ", b = " + result[1]);
3535
* </code>
3636
* </pre>
3737
*/
3838
public class SwapNumbersUsingXor {
39-
39+
private SwapNumbersUsingXor() {
40+
}
4041
/**
4142
* Swaps two numbers using XOR.
4243
*

0 commit comments

Comments
 (0)