Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static int[] stringToIntArray(String text) {
        String[] parts = text.split("\\s");
        int[] values = new int[parts.length];
        for (int i = 0; i < parts.length; i++) {
            values[i] = Integer.valueOf(parts[i]);
        }

        return values;
    }
}