Scope and Access

AP Computer Science A· difficulty 3/5

Local variables in a method

  • A

    Are shared with all instances

  • B

    Persist across method calls

  • C

    Default to 0

  • D

    Only exist while the method is executing

    check_circle

Explanation

Locals live on the stack frame; destroyed when method returns.

Want 10 more like this — adaptive to your weak spots?

Related questions