Writer Append2() Example
Appends a subsequence of the specified character sequence to this writer.
Writer class Append2() method example. This example shows you how to use Append2() method.This method Appends a subsequence of the specified character sequence to this writer.
Here is the code:-
/**
* @Program that Appends a subsequence of the specified character sequence to
* this writer.
* Append2.java
* Author:-RoseIndia Team
* Date:-5-jun-2008
*/
import java.io.*;
public class Append2 {
public static void main(String[] args) {
StringWriter w = new StringWriter();
w.write("Rose");
System.out.println("String before Appending is: " + w);
/// Appends a subsequence of the specified character sequence to this writer.
w.append("indiaRohini",5,11);
System.out.println("String after Appending is: " + w);
}
} |
Output of the Program
String before Appending is: Rose
String after Appending is: RoseRohini |
|