+2 votes
in JAVA by
Can a variable be local and static at the same time in Java?

1 Answer

0 votes
by

No a variable can’t be static as well as local at the same time. Defining a local variable as static gives compilation error.

Related questions

0 votes
asked Apr 10, 2021 in JAVA by Robindeniel
0 votes
asked Dec 16, 2020 in JAVA by SakshiSharma
...