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) {
        Byte b1 = new Byte("100");
        Byte b2 = new Byte("-100");

        int i1 = b1.hashCode();
        int i2 = b2.hashCode();

        String str1 = "Hashcode of Byte " + b1 + " is " + i1;
        String str2 = "Hashcode of Byte " + b2 + " is " + i2;

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