Java source code examples

Java source code samples. Java code examples.

Create a StringWriter object

          0 votes

The default constructor allows us to create a StringWriter with default string buffer size.

import java.io.StringWriter;

/**
 * StringWriter class examples.
 */
public class StringWriterExample {
	public static void main(String[] args){
		// Create a stringWriter object.
		StringWriter writer = new StringWriter();
	}
}

Tags: java.io

Discuss This Code