Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String[] args) {
        String str = "one,two,three,four,five";

        String[] elements = str.split(",");

        for (int i = 0; i < elements.length; i++)
            System.out.println(elements[i]);

    }
}
/*
    
one
two
three
four
five
*/