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[] getYMD(String date) {
        int[] dateYMD = new int[3];
        String[] strings = date.split("-");
        dateYMD[0] = Integer.valueOf(strings[0]);
        dateYMD[1] = Integer.valueOf(strings[1]);
        dateYMD[2] = Integer.valueOf(strings[2].split(" ")[0]);
        return dateYMD;
    }
}