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[] splitString(String str, String del) {
        String[] res;
        if (str.contains(del)) {
            res = str.split(del);
        } else {
            res = new String[] { str };
        }
        return res;
    }
}