Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FilterWriter;
import java.io.StringWriter;
import java.io.Writer;

public class Main {
    public static void main(String[] args) throws Exception {

        char[] cbuf = { 'A', 'B', 'C', 'D', 'E', 'F' };

        Writer w = new StringWriter(6);

        FilterWriter fw = new FilterWriter(w) {
        };

        fw.write(cbuf, 2, 4);

        String s = w.toString();

        System.out.print(s);
    }
}