Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Can you declare a class as private?
Can you declare a class as private?
✍: Guest
Yes, we can declare a private
class as an inner class. For example,
class MyPrivate {
private static class MyKey {
String key = "12345";
}
public static void main(String[] args) {
System.out.println(new MyKey().key);//prints 12345
}
}
2012-08-23, 2786👍, 0💬
Popular Posts:
What is the benefit of using #define to declare a constant? Using the #define method of declaring a ...
What Is the "@SuiteClasses" Annotation? "@SuiteClasses" is a class annotation defined in JUnit 4.4 i...
Where are all .NET Collection classes located ? System.Collection namespace has all the collection c...
What are the high-level thread states? The high-level thread states are ready, running, waiting, and...
How To Change System Global Area (SGA)? - Oracle DBA FAQ - Introduction to Oracle Database 10g Expre...