Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String getMNC(String IMSI) {

        String IMSIsub = IMSI.substring(3, 5);
        if (IMSIsub.equals("01")) {
            return "CHINA_UNICOM";
        } else if (IMSIsub.equals("00")) {
            return "CHINA_MOBILE";
        } else if (IMSIsub.equals("03")) {
            return "CHINA_TELECOM";
        } else {
            return null;
        }
    }
}