In Java, a variable declared within a method is referred to as a ________ variable.

  • Global
  • Instance
  • Local
  • Static
In Java, a variable declared within a method is referred to as a "Local" variable. Local variables are defined within a method and are only accessible within that method's scope. They are used for temporary storage and are typically used to store intermediate results or data specific to a method.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *