StringCharacterIterator: setText(String text) : StringCharacterIterator « java.text « Java by API






StringCharacterIterator: setText(String text)

 

import java.text.CharacterIterator;
import java.text.StringCharacterIterator;

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

    CharacterIterator it = new StringCharacterIterator("abcd");

    ((StringCharacterIterator) it).setText("efgh");
    char ch = it.current(); 
  }
}

   
  








Related examples in the same category

1.new StringCharacterIterator(String text)