Skip to content

Commit 0236fe9

Browse files
authored
Adding SetBit
1 parent 29a864b commit 0236fe9

File tree

1 file changed

+5
-0
lines changed
  • src/main/java/com/thealgorithms/bitmanipulation

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public class GetBit {
2+
public static int getBit(int num, int get) {
3+
return (num>>get) & 1;
4+
}
5+
}

0 commit comments

Comments
 (0)