blikk info infothek forum galerie sitemap

String in JAVA

zur Aufgabenstellung

package wiki;

public class StringText {

/**

* @param args

*/

//by Alexander Broll

public static void main(String[] args) {

StringBuffer test = new StringBuffer("i hate strings");

System.out.println(test);

StringBuffer text1 = new StringBuffer(test.delete(2,6));

System.out.println(test);

StringBuffer text2 = new StringBuffer(text1.insert(2, "love "));

System.out.println(text2);

}

}

nach oben