+ 6

Variable name in java

How many characters will the variable be in maximum state in Java ?

14th Nov 2020, 7:06 PM
Ghezal Shefa
Ghezal Shefa - avatar
12 odpowiedzi
+ 1
No limitations but it recommended to use a readable, less charecter's word.
14th Nov 2020, 9:43 PM
Jayakrishna 🇮🇳
+ 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
9th Dec 2020, 10:10 AM
Ghezal Shefa
Ghezal Shefa - avatar
+ 4
😂 okay Yes you are right I will try it again Thanks again Jayakrishna🇮🇳
14th Nov 2020, 10:39 PM
Ghezal Shefa
Ghezal Shefa - avatar
+ 4
Why you do this 42*8+7 It has a comment ???
14th Nov 2020, 10:49 PM
Ghezal Shefa
Ghezal Shefa - avatar
14th Nov 2020, 10:50 PM
Ghezal Shefa
Ghezal Shefa - avatar
+ 4
Thanks allot Jayakrishna🇮🇳 🙏🙏
15th Nov 2020, 1:49 PM
Ghezal Shefa
Ghezal Shefa - avatar
+ 3
Jayakrishna🇮🇳 maybe but I don't think so 🙈
14th Nov 2020, 10:23 PM
Ghezal Shefa
Ghezal Shefa - avatar
+ 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..
15th Nov 2020, 1:48 PM
Jayakrishna 🇮🇳
+ 2
Ghezaal Shefa you're welcome...
15th Nov 2020, 1:50 PM
Jayakrishna 🇮🇳
16th Nov 2020, 8:29 PM
Rohullah Saberi
Rohullah Saberi - avatar
+ 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 "); } }
14th Nov 2020, 10:33 PM
Jayakrishna 🇮🇳