Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.text.BreakIterator;
import java.util.Locale;

public class Main {
    public static void main(String[] argv) throws Exception {

        BreakIterator iterator = BreakIterator.getWordInstance(Locale.CANADA);
        iterator.setText("a sentence");
        for (int index = iterator.first(); index != BreakIterator.DONE; index = iterator.next()) {
            System.out.println(index);
        }
    }
}