Java Reference
In-Depth Information
7 . If all objects of a class need to share the same variable, how must you declare that
variable?
Shared variables are declared as static .
8 . Why might you need to use a static block?
A static block is used to perform any initializations related to the class, before any
objects are created.
9 . What is an inner class?
An inner class is a nonstatic nested class.
10 . To make a member accessible by only other members of its class, what access modifi-
er must be used?
Search WWH ::




Custom Search