Create Restore IP Addresses.java

The hard part here is to check if a segmentation is valid or not. 00 and 010 need to be checked specially to make sure ip address is legal