jshell> BigInteger.ONE $1 ==> 1 jshell> BigInteger.TEN $2 ==> 10 jshell> BigInteger a = new BigInteger("8234593824998023598023598032589023598023590834890235"); a ==> 8234593824998023598023598032589023598023590834890235 jshell> BigInteger b = new BigInteger("9803259805248235890325980352980325980352890325980235890235890235890983250592380 jshell> BigInteger b = new BigInteger("9803259805248235890325980352980325980352890325980235890235890235890983250592380 jshell> BigInteger b = new BigInteger("9803259805248235890325980352980325980352890325980235890235890235890983250592380 jshell> BigInteger b = new BigInteger("9803259805248235890325980352980325980352890325980235890235890235890983250592380"); b ==> 9803259805248235890325980352980325980352890325980235890235890235890983250592380 jshell> a a ==> 8234593824998023598023598032589023598023590834890235 jshell> b b ==> 9803259805248235890325980352980325980352890325980235890235890235890983250592380 jshell> a*b | Error: | bad operand types for binary operator '*' | first type: java.math.BigInteger | second type: java.math.BigInteger | a*b | ^-^ jshell> a.multiply(b) $7 ==> 80725862657148450672567420472175913617410214222516097943285057735255828256989883771485443777236171097359092071093154712336027409300 jshell> a.add(b) $8 ==> 9803259805248235890325980361214919805350913924003833922824913833914574085482615 jshell> a.divide(b) $9 ==> 0 jshell> a.gcd(b) $10 ==> 45 jshell> BigInteger bust = new BigInteger(42); | Error: | BigInteger(long) has private access in java.math.BigInteger | BigInteger bust = new BigInteger(42); | ^----------------^ jshell> BigInteger bust = BigInteger.valueOf(42); bust ==> 42 jshell> bust bust ==> 42 jshell> bust.pow(200) $13 ==> 4465376470175488819583354332837479881996088252645562774335559567825748798543416842675126232847768910589361958464270125522765164954545965420614182507056590733983770160518719452011792956238552577129118989946103418485965855406443705248609754712833369621198417226775605130616769349401274892440587696041471377975358783976820965376 jshell> bust.sqrt() $14 ==> 6 jshell> BigInteger.valueOf(100).sqrt() $15 ==> 10 jshell> (base) MAC:Thu Oct 14:13:14:~>