gpt4 book ai didi

java - System.out.println ("abc"+3+2);为什么输出是 abc32 而不是 abc5?

转载 作者:搜寻专家 更新时间:2023-11-01 01:00:51 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Difference between int and int received by ParseInt in java

System.out.println("abc"+3+2); // Output: abc32

System.out.println(3+2+"abc"); //Output: 5abc

这是什么原因?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com