O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Concept of Scope

The term scope applies to the visibility of the programming elements within a program. This term is usually applied to the variables within the program. For Java, variables represent either primitive data types or object references. Java provides eight primitive data types: byte, char, short, int, long, float, double, and boolean. Everything else in the Java language is an object reference. Since object references can represent any valid Java class, there is a great deal of flexibility and extensibility in this process. Since for all effective purposes, a Java class is a data type, the Java language is type extensible—whatever data type is needed can be created as a class.

All Java references have some form of scope. For ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required