| Welcome to JShell -- Version 17.0.6 | For an introduction type: /help intro
jshell> vari=newInteger(12345678) | Warning: | Integer(int) in java.lang.Integer has been deprecated and marked for removal | vari=newInteger(12345678); | ^-------------------^ i ==> 12345678
jshell> Integeri=12345678; i ==> 12345678
jshell> Longl=12345678L; l ==> 12345678
jshell> i.equals(i, l) | Error: | method equals in classjava.lang.Integer cannot be applied to given types; | required: java.lang.Object | found: java.lang.Integer,java.lang.Long | reason: actual and formal argument lists differ in length | i.equals(i, l) | ^------^
jshell> Objects.equals(i, l) $4 ==> false
jshell> i == l | Error: | incomparable types: java.lang.Integer and java.lang.Long | i == l | ^----^
(base) ➜ spring3-template git:(main) ✗ scala Welcome to Scala3.2.1 (17.0.6, JavaOpenJDK64-BitServerVM). Type in expressions for evaluation. Ortry :help.
scala> val i = new java.lang.Integer(12345678) there was 1 deprecation warning; re-run with -deprecation for details 1 warning found val i: Integer = 12345678
scala> val l = new java.lang.Long(12345678) there was 1 deprecation warning; re-run with -deprecation for details 1 warning found val l: Long = 12345678
scala> i.equals(l) val res0: Boolean = false
scala> java.util.Objects.equals(i, l) val res1: Boolean = false