Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [scope]

This tag is intended for all questions related to name/identifier scoping in the various languages used in teaching. It can also be used for questions concerning the kind of scoping (e.g. lexical v. dynamic).

11
votes
7answers
166 views

How to illustrate scope problem when creating variables inside `if` statements in Java

One of the problems that my students will stumble upon every year is trying to create or initialize variables within an if/else ...