+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 May 5, 2021 in JAVA by SakshiSharma
+2 votes
asked Feb 8, 2020 in JAVA by rahuljain1
...