search

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

wsws888 days ago893

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