Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static String getFuzzyIp(String ip) {
        final String[] ipParts = ip.split("\\.");
        if (ipParts.length == 4) {
            return String.format("%s.%s.*.*", ipParts[0], ipParts[1]);
        }

        return ip;
    }
}