java创建计数器变量,用于检查变量(计数器)最大长度的Java方法
Kindly please anyone who knows is the any method to know
what is the limit of length of a counter?
Depsite from initiliazed variable''s types (either int, byte, long etc)
is there any way for me to check my variable (counter)''s max lenght?
Please share the info with me...
Thank you in advance.
解決方案
Kindly please anyone who knows is the any method to know
what is the limit of length of a counter?
Depsite from initiliazed variable''s types (either int, byte, long etc)
is there any way for me to check my variable (counter)''s max lenght?
Please share the info with me...
Thank you in advance.
What type is your counter ?
What type is your counter ?
Integer type.
Is there any method that I could check it despite initialize int type the max would be 32 lenght?
Integer type.
Is there any method that I could check it despite initialize int type the max would be 32 lenght?
I''m not sure I got you right but maximum value an int can take is (2^31) - 1.
You can get this using Integer.MAX_VALUE
總結
以上是生活随笔為你收集整理的java创建计数器变量,用于检查变量(计数器)最大长度的Java方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 花呗被冻结什么时候解冻
- 下一篇: java基础代码下载_Java基础(一)