Post

Simon Taddiken
Simon Taddiken@ProjectPolly·
@EclipseJavaIDE No. The overflow is neither detected during compile time nor does it change the type from Integer to long in any way and is thus irrelevant for overload resolution
English
0
0
16
0
malvern
malvern@malverndongeni·
@EclipseJavaIDE NO... When overloading the compiler will do the following checks [1] check Exact match by type. (if not found) [2] check larger primitive type. (if not found) [3] check Autoboxed type (if not) [4] use Varargs... (ELAV)
English
0
0
2
0
medmedin2014
medmedin2014@medmedin2017·
@EclipseJavaIDE The result is No because : 1) Integer.MAX_VALUE+1 => Integer.MIN_VALUE Integer.MIN_VALUE-1 => Integer.MAX_VALUE 2) Autoboxing is preferred than ellipsis argument
English
0
0
0
0
gorlok 🧉🧙‍♂️
@EclipseJavaIDE That's evil 😀 I think it's "No". The constant value 1 is int, so I think it will rollover on Integer. There is no longs values to cast to long.
English
0
0
0
0
Paylaş