Interview answers verified by specialists.

Find interview questions and answers on this website:


See right interview answers on 30 common job interview questions

Can a class be declared as static?

We can not declare top level class as static, but only inner class can be declared static.
public class Test
{ 
    static class InnerClass
    {
        public static void InnerMethod()
        { System.out.println("Static Inner Class!"); }
    } 
    public static void main(String args[])
    {
       Test.InnerClass.InnerMethod();
    }
}
//output: Static Inner Class!

Do you know that?

90% of Elance-oDesk clients feel that hiring online will soon become a common practice Next

Articles:

Fast Payments
Payoneer sing up to get free 
$25