表达式之谜---初级问题

xiaoxiao2022-06-12  20

1. 要避免使用l(小写字母l)作为变量名,因为,l 和1容易混淆。

2. 在long型字面常量中,一定要大写L,千万不要用小写。

 

代码:

public class Elementary { /** * 初级问题 */ public static void main(String[] args) { System.out.println(12345+5432l); } }

 

结果: 17777,

相关资源:Java解惑[高清].pdf
转载请注明原文地址: https://www.6miu.com/read-4933490.html

最新回复(0)