New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Can we declare the global variable in java?
if yes then how to do that?
2 Answers
+ 1
no there are no global variable but we can use static variable as global variable
+ 1
use "static" keyword before type declaration of your variable