### Question:
IP { public String getIPSection(){ if(ip==null) return null; if(netmask == null || netmask.equals("32")){ return ip; } else{ return ip+"/"+netmask; } } IP(String ip);  IP(String ip, String netmask);  IP(String ip, String netmask, String getway); String getIp(); Boolean isPublicIP(); String toString(); String getIPSection();  }### Answer:
@Test public void test() { IP ip=new IP("10.100.1.0"); System.err.println(ip.getIPSection()); IP ip2=new IP("10.100.1.0/32"); System.err.println(ip2.getIPSection()); IP ip3=new IP("10.100.1.0/255.255.255.250"); System.err.println(ip3.getIPSection()); IP ip4=new IP("10.100.1.a"); System.err.println(ip4.getIPSection()); }