Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static void splitName(String nodeName, String[] name) {
        int p = nodeName.indexOf(":");
        if (p < 0) {
            name[0] = null;
            name[1] = nodeName;
        } else {
            name[0] = nodeName.substring(0, p);
            name[1] = nodeName.substring(p + 1);
        }
    }
}