Home  >  Q&A  >  body text

In Lesson 6-12, the teacher said that int can be directly converted to float. I didn’t quite understand it.

System.out.println(sum(10.5f,20)); I forgot that knowledge point, why can int go directly to float

wsws743 days ago693

reply all(1)I'll reply

  • autoload

    autoload2022-07-15 09:27:56

    Small numbers can be directly converted into large ones, implicit conversion, such as 1 on a three-digit display, can be replaced by 001

    reply
    0
  • Cancelreply