Svish Svish - 1 year ago 110
Java Question

Is there anything like an Internal class in Java?

In C# you can mark a class as

so that it is only accessible from within the same package. Is there anything similar in Java?

Answer Source

You can create package-private classes by omitting the security modifier (public, private) from the class's declaration.

package com.sample;

class MyPackagePrivateClass
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download