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) {
        Double obj1 = new Double("2");
        Double obj2 = new Double("2.0");
        System.out.print(obj1 + " = " + obj2);
        System.out.println(" ?  " + obj1.equals(obj2));

        obj1 = new Double("3");
        obj2 = new Double("4");
        System.out.print(obj1 + " = " + obj2);
        System.out.println(" ?  " + obj1.equals(obj2));
    }
}