why-does-passing-the-literal-3-choose-the-int-overload-and-not-the-short-o


SUBMITTED BY: menamagice

DATE: Aug. 9, 2017, 2:03 a.m.

FORMAT: Text only

SIZE: 101 Bytes

HITS: 254

  1. 3 has type int
  2. For your function execution you need
  3. short s = 3;
  4. fun(s);
  5. or
  6. fun((short)3);

comments powered by Disqus