+ 6
Variable name in java
How many characters will the variable be in maximum state in Java ?
12 Respostas
+ 1
No limitations but it recommended to use a readable, less charecter's word.
+ 5
No we have limited
You can see this page it is correct answer i find my answer in here
65535 characters due to:
https://stackoverflow.com/questions/8782465/length-limit-for-a-variable-name-in-java?lq=1
+ 4
😂 okay
Yes you are right
I will try it again
Thanks again Jayakrishna🇮🇳
+ 4
Why you do this
42*8+7
It has a comment ???
+ 4
Thanks allot Jayakrishna🇮🇳 🙏🙏
+ 3
Jayakrishna🇮🇳 maybe
but I don't think so 🙈
+ 2
Ghezaal Shefa Just run the code, you can understand it...
I mean there, I used 42charecter x 8times with 7 _underscore's between so total variable have 343 charecters used for that variable to show an example.. No errors. Works fine..
+ 2
Ghezaal Shefa you're welcome...
+ 2
65535 characters due to:
https://stackoverflow.com/questions/8782465/length-limit-for-a-variable-name-in-java?lq=1
+ 1
/*It may be depends on memory but not on language specification... Check in once works fine.. Ghezaal Shefa*/
public class Program
{
public static void main(String[] args) {
int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =7 ;
System.out.println(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);
System.out.println("this variables has " + ( 42*8+7) + " characters, working very fine ");
}
}