MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

class MainClass {
    public static void main(String[] args) {
        Character c1 = new Character('6');
        Character c2 = new Character('7');

        char c3 = c1.charValue();
        char c4 = c2.charValue();

        if (c3 < c4)
            System.out.println(c3 + " is less than " + c4);

        if (c1.compareTo(c2) < 0)
            System.out.println(c1 + " is less than " + c4);
    }
}