Menu
Question Index
...

What is the output of the following program?

import java.util.*;
import java.text.*;
public class DailyDoseA {
    public static void main(String[] arg) throws Exception {
        BreakIterator iterator = BreakIterator.getCharacterInstance(Locale.ENGLISH);
        iterator.setText("india");
        for (int index = iterator.first(); index != BreakIterator.DONE; index = iterator.next()) {
            System.out.print(index);
        }
    }
}


01234
012345
12345
Compilation Error or Runtime Error

Doubts

Problems

Topic: Other Advanced Topics In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App