Skip to content
欢迎扫码关注公众号

Java 解惑 -04:初级问题

下面打印的结果为什么不是 66666 而是 17777

java
System.out.println(12345 + 5432l); // print 17777

仔细点看代码就会发现 5432l 最后面的字母不是 1 而是 l 。这是个很初级的错误,万一遇到了很难发现。
所以大多数编程规约中都规定,long 型字面常量中需要使用大写的 L,严禁使用小写的 l

相类似的,也要避免使用单个小写的 l 字母作为变量名。

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.