public class MainClass{ public static void main(String args[]){ Long L = new Long( 7 ); if( L.equals( 7L )) System.out.println("Equal"); else System.out.println("Not Equal"); } }