Skip to Main Content
Java
book

Java

by Michael Sikora
January 2003
Beginner to intermediate content levelBeginner to intermediate
150 pages
7h 28m
English
Morgan Kaufmann
Content preview from Java
ii
5.7 Inner Classes
67
class B
class A
class D
Package
class C
class E
Figure
5.1 "- Java access levels.
Figure 5.1 summarizes Java access levels. A vertical line represents a subclass relation-
ship, so class B is a subclass of class A. Assume the protection levels are set in class A. Then
the following classes can access methods and variables in class A:
public classes A, B, C, D, and E
protected classes A, B, C, and D
package, or friendly classes A, B, and D
private class A
5.7 Inner Classes
An inner class is a class nested within another class. We can describe an inner class schemati-
cally as follows:
class Outer {
class ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Programming

Java Programming

Poornachandra Sarang
JAVA Programming

JAVA Programming

K. Rajkumar
Java Programming

Java Programming

Hari Mohan Pandey
Java 9 for Programmers

Java 9 for Programmers

Paul J. Deitel, Harvey Deitel

Publisher Resources

ISBN: 9781558609099