Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String[] args) {
        Character c1 = new Character('z');
        Character c2 = new Character('Z');

        int i1 = c1.hashCode();
        int i2 = c2.hashCode();

        String str1 = "Hashcode of " + c1 + " is " + i1;
        String str2 = "Hashcode of " + c2 + " is " + i2;

        System.out.println(str1);
        System.out.println(str2);
    }
}