Check out example codes for "java Convert a string IPv4 IP address to the equivalent long numeric value.". It will help you in understanding the concepts better.

Code Example 1

result += (Integer.parseInt(ipAddressInArray[i]) % 256 * Math.pow(256, power));
Copied!

Learn ReactJs, React Native from akashmittal.com