Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.FilterReader;
import java.io.Reader;
import java.io.StringReader;

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

        // create new reader
        Reader r = new StringReader("ABCDEF");

        // create new filter reader
        FilterReader fr = new FilterReader(r) {
        };

        // tests if the filter reader supports mark()
        boolean bool = fr.markSupported();

        // prints
        System.out.print("If mark() supported? " + bool);

    }
}