Writer Write4() Example
Writes a portion of a string.
Writer class Write4() method example. This example shows you how to use Write4() method.This method Writes a portion of a string.
Here is the code:-
/**
* @Program that Write a portion of a string.
* Write4.java
* Author:-RoseIndia Team
* Date:-5-jun-2008
*/
import java.io.*;
public class Write4 {
public static void main(String[] args) {
String s="RoseIndia";
StringWriter writer = new StringWriter();
// Writes a portion of a string.
writer.write(s, 4, s.length() - 4);
System.out.println(writer);
}
} |
|