MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

public class MainClass {
    public static void main(String args[]) {
        Object test = null;
        System.out.printf("%b\n", false);
        System.out.printf("%b\n", true);
        System.out.printf("%b\n", "Test");
        System.out.printf("%B\n", test);
        System.out.printf("Hashcode of \"hello\" is %h\n", "hello");
        System.out.printf("Hashcode of \"Hello\" is %h\n", "Hello");
        System.out.printf("Hashcode of null is %H\n", test);
        System.out.printf("Printing a %% in a format string\n");
        System.out.printf("Printing a new line %nnext line starts here");
    }
}