Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.*;

public class Main {

    public static void main(String[] args) {
        CharSequence sq1 = "Hello";
        CharSequence sq2 = " World";

        PrintWriter pw = new PrintWriter(System.out);

        // append the sequence
        pw.append(sq1);
        pw.append(sq2);

        // flush the writer
        pw.flush();

    }
}