Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
22.33.442.555.0
Please help me to get each value separated which is separated by dot
ip1 = 22
ip2 = 33
ip3 = 442
ip 4 = 555
You are working with an int. An int's max size is 4 bytes or 32 bits. This equates to a range of −2,147,483,648 to 2,147,483,647. This is why your number is wrong. You should probably work with BigDecimals to work with calculations this big.