Multiple choice technology programming languages

A variable declared inside a method is called

  1. a. local variable

  2. b. global variable

  3. c. static variable

  4. d. private variable

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Variables declared inside a method have local scope - they exist only within that method's block and are not accessible outside. They're created when the method is called and destroyed when it returns. Global variables exist at class/file level, static variables persist across instances, and private is an access modifier, not a variable classification.