Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Is it possible to declare a class inside another class and to have the inner class access the private variable of the main
class?
Certainly! Java 1.1 introduced the concept of inner classes to the Java language. Here's an example of an inner class accessing
a private data member of an enclosing class:
public class OuterClass {
private static String hiding = "You can't see me!";
public static class InnerClass {
public static void showMe() {
System.out.println(hiding);
}
}
public static void main (String args[]) {
InnerClass.showMe();
}
}
When run, this application will print out "You can't see me!"