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