mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 09:45:04 +08:00
Add Numbers Have Different Signs (#4317)
Co-authored-by: BamaCharanChhandogi <b.c.chhandogi@gmailcom>
This commit is contained in:

committed by
GitHub

parent
18848574be
commit
2c16c86054
@ -0,0 +1,13 @@
|
||||
package com.thealgorithms.bitmanipulation;
|
||||
|
||||
/**
|
||||
* Numbers Different Signs
|
||||
* @author Bama Charan Chhandogi
|
||||
*/
|
||||
|
||||
public class NumbersDifferentSigns {
|
||||
|
||||
public static boolean differentSigns(int num1, int num2) {
|
||||
return (num1 ^ num2) < 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user