import java.math.BigInteger; public class Example { public static void main(String[] args) { BigInteger bigInt = new BigInteger("-10"); int sign = bigInt.signum(); System.out.println(sign); } }
import java.math.BigInteger; public class Example { public static void main(String[] args) { BigInteger bigInt = BigInteger.ZERO; int sign = bigInt.signum(); System.out.println(sign); } }
import java.math.BigInteger; public class Example { public static void main(String[] args) { BigInteger bigInt = new BigInteger("100"); int sign = bigInt.signum(); System.out.println(sign); } }Output: 1